Use class_args field in opclass_drop

This makes it consistent with the usage in opclass_item.

Reviewed-by: Jim Nasby <Jim.Nasby@BlueTreble.com>
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
This commit is contained in:
Peter Eisentraut 2016-12-28 12:00:00 -05:00
parent 12a2544cb5
commit 63ebd377a6
3 changed files with 6 additions and 5 deletions

View File

@ -989,7 +989,7 @@ AlterOpFamilyDrop(AlterOpFamilyStmt *stmt, Oid amoid, Oid opfamilyoid,
errmsg("invalid operator number %d,"
" must be between 1 and %d",
item->number, maxOpNumber)));
processTypesSpec(item->args, &lefttype, &righttype);
processTypesSpec(item->class_args, &lefttype, &righttype);
/* Save the info */
member = (OpFamilyMember *) palloc0(sizeof(OpFamilyMember));
member->number = item->number;
@ -1004,7 +1004,7 @@ AlterOpFamilyDrop(AlterOpFamilyStmt *stmt, Oid amoid, Oid opfamilyoid,
errmsg("invalid procedure number %d,"
" must be between 1 and %d",
item->number, maxProcNumber)));
processTypesSpec(item->args, &lefttype, &righttype);
processTypesSpec(item->class_args, &lefttype, &righttype);
/* Save the info */
member = (OpFamilyMember *) palloc0(sizeof(OpFamilyMember));
member->number = item->number;

View File

@ -5910,7 +5910,7 @@ opclass_drop:
CreateOpClassItem *n = makeNode(CreateOpClassItem);
n->itemtype = OPCLASS_ITEM_OPERATOR;
n->number = $2;
n->args = $4;
n->class_args = $4;
$$ = (Node *) n;
}
| FUNCTION Iconst '(' type_list ')'
@ -5918,7 +5918,7 @@ opclass_drop:
CreateOpClassItem *n = makeNode(CreateOpClassItem);
n->itemtype = OPCLASS_ITEM_FUNCTION;
n->number = $2;
n->args = $4;
n->class_args = $4;
$$ = (Node *) n;
}
;

View File

@ -2424,7 +2424,8 @@ typedef struct CreateOpClassItem
List *args; /* argument types */
int number; /* strategy num or support proc num */
List *order_family; /* only used for ordering operators */
List *class_args; /* only used for functions */
List *class_args; /* amproclefttype/amprocrighttype or
* amoplefttype/amoprighttype */
/* fields used for a storagetype item: */
TypeName *storedtype; /* datatype stored in index */
} CreateOpClassItem;