7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.46 2000/01/05 18:23:45 momjian Exp $
10
+ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.47 2000/01/10 17:14:31 momjian Exp $
11
11
*
12
12
* NOTES
13
13
* these routines moved here from commands/define.c and somewhat cleaned up.
@@ -482,7 +482,7 @@ OperatorDef(char *operatorName,
482
482
bool rightDefined = false;
483
483
bool selfCommutator = false;
484
484
char * name [4 ];
485
- Oid typeId [8 ];
485
+ Oid typeId [FUNC_MAX_ARGS ];
486
486
int nargs ;
487
487
NameData oname ;
488
488
TupleDesc tupDesc ;
@@ -556,7 +556,7 @@ OperatorDef(char *operatorName,
556
556
* have to worry about deleting them later.
557
557
* ----------------
558
558
*/
559
- MemSet (typeId ,0 ,8 * sizeof (Oid ));
559
+ MemSet (typeId ,0 ,FUNC_MAX_ARGS * sizeof (Oid ));
560
560
if (!leftTypeName )
561
561
{
562
562
typeId [0 ]= rightTypeId ;
@@ -592,7 +592,7 @@ OperatorDef(char *operatorName,
592
592
*/
593
593
if (restrictionName )
594
594
{/* optional */
595
- MemSet (typeId ,0 ,8 * sizeof (Oid ));
595
+ MemSet (typeId ,0 ,FUNC_MAX_ARGS * sizeof (Oid ));
596
596
typeId [0 ]= OIDOID ;/* operator OID */
597
597
typeId [1 ]= OIDOID ;/* relation OID */
598
598
typeId [2 ]= INT2OID ;/* attribute number */
@@ -617,7 +617,7 @@ OperatorDef(char *operatorName,
617
617
*/
618
618
if (joinName )
619
619
{/* optional */
620
- MemSet (typeId ,0 ,8 * sizeof (Oid ));
620
+ MemSet (typeId ,0 ,FUNC_MAX_ARGS * sizeof (Oid ));
621
621
typeId [0 ]= OIDOID ;/* operator OID */
622
622
typeId [1 ]= OIDOID ;/* relation OID 1 */
623
623
typeId [2 ]= INT2OID ;/* attribute number 1 */
@@ -923,11 +923,11 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
923
923
setheapoverride (true);
924
924
heap_update (pg_operator_desc ,& tup -> t_self ,tup ,NULL );
925
925
setheapoverride (false);
926
-
926
+
927
927
if (RelationGetForm (pg_operator_desc )-> relhasindex )
928
928
{
929
929
Relation idescs [Num_pg_operator_indices ];
930
-
930
+
931
931
CatalogOpenIndices (Num_pg_operator_indices ,Name_pg_operator_indices ,idescs );
932
932
CatalogIndexInsert (idescs ,Num_pg_operator_indices ,pg_operator_desc ,tup );
933
933
CatalogCloseIndices (Num_pg_operator_indices ,idescs );
@@ -961,7 +961,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
961
961
if (RelationGetForm (pg_operator_desc )-> relhasindex )
962
962
{
963
963
Relation idescs [Num_pg_operator_indices ];
964
-
964
+
965
965
CatalogOpenIndices (Num_pg_operator_indices ,Name_pg_operator_indices ,idescs );
966
966
CatalogIndexInsert (idescs ,Num_pg_operator_indices ,pg_operator_desc ,tup );
967
967
CatalogCloseIndices (Num_pg_operator_indices ,idescs );
@@ -1001,7 +1001,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
1001
1001
if (RelationGetForm (pg_operator_desc )-> relhasindex )
1002
1002
{
1003
1003
Relation idescs [Num_pg_operator_indices ];
1004
-
1004
+
1005
1005
CatalogOpenIndices (Num_pg_operator_indices ,Name_pg_operator_indices ,idescs );
1006
1006
CatalogIndexInsert (idescs ,Num_pg_operator_indices ,pg_operator_desc ,tup );
1007
1007
CatalogCloseIndices (Num_pg_operator_indices ,idescs );