77 *
88 *
99 * 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 $
1111 *
1212 * NOTES
1313 * these routines moved here from commands/define.c and somewhat cleaned up.
@@ -482,7 +482,7 @@ OperatorDef(char *operatorName,
482482bool rightDefined = false;
483483bool selfCommutator = false;
484484char * name [4 ];
485- Oid typeId [8 ];
485+ Oid typeId [FUNC_MAX_ARGS ];
486486int nargs ;
487487NameData oname ;
488488TupleDesc tupDesc ;
@@ -556,7 +556,7 @@ OperatorDef(char *operatorName,
556556 * have to worry about deleting them later.
557557 * ----------------
558558 */
559- MemSet (typeId ,0 ,8 * sizeof (Oid ));
559+ MemSet (typeId ,0 ,FUNC_MAX_ARGS * sizeof (Oid ));
560560if (!leftTypeName )
561561{
562562typeId [0 ]= rightTypeId ;
@@ -592,7 +592,7 @@ OperatorDef(char *operatorName,
592592 */
593593if (restrictionName )
594594{/* optional */
595- MemSet (typeId ,0 ,8 * sizeof (Oid ));
595+ MemSet (typeId ,0 ,FUNC_MAX_ARGS * sizeof (Oid ));
596596typeId [0 ]= OIDOID ;/* operator OID */
597597typeId [1 ]= OIDOID ;/* relation OID */
598598typeId [2 ]= INT2OID ;/* attribute number */
@@ -617,7 +617,7 @@ OperatorDef(char *operatorName,
617617 */
618618if (joinName )
619619{/* optional */
620- MemSet (typeId ,0 ,8 * sizeof (Oid ));
620+ MemSet (typeId ,0 ,FUNC_MAX_ARGS * sizeof (Oid ));
621621typeId [0 ]= OIDOID ;/* operator OID */
622622typeId [1 ]= OIDOID ;/* relation OID 1 */
623623typeId [2 ]= INT2OID ;/* attribute number 1 */
@@ -923,11 +923,11 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
923923setheapoverride (true);
924924heap_update (pg_operator_desc ,& tup -> t_self ,tup ,NULL );
925925setheapoverride (false);
926-
926+
927927if (RelationGetForm (pg_operator_desc )-> relhasindex )
928928{
929929Relation idescs [Num_pg_operator_indices ];
930-
930+
931931CatalogOpenIndices (Num_pg_operator_indices ,Name_pg_operator_indices ,idescs );
932932CatalogIndexInsert (idescs ,Num_pg_operator_indices ,pg_operator_desc ,tup );
933933CatalogCloseIndices (Num_pg_operator_indices ,idescs );
@@ -961,7 +961,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
961961if (RelationGetForm (pg_operator_desc )-> relhasindex )
962962{
963963Relation idescs [Num_pg_operator_indices ];
964-
964+
965965CatalogOpenIndices (Num_pg_operator_indices ,Name_pg_operator_indices ,idescs );
966966CatalogIndexInsert (idescs ,Num_pg_operator_indices ,pg_operator_desc ,tup );
967967CatalogCloseIndices (Num_pg_operator_indices ,idescs );
@@ -1001,7 +1001,7 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId)
10011001if (RelationGetForm (pg_operator_desc )-> relhasindex )
10021002{
10031003Relation idescs [Num_pg_operator_indices ];
1004-
1004+
10051005CatalogOpenIndices (Num_pg_operator_indices ,Name_pg_operator_indices ,idescs );
10061006CatalogIndexInsert (idescs ,Num_pg_operator_indices ,pg_operator_desc ,tup );
10071007CatalogCloseIndices (Num_pg_operator_indices ,idescs );