]> granicus.if.org Git - postgresql/commitdiff
Use class_args field in opclass_drop
authorPeter Eisentraut <peter_e@gmx.net>
Wed, 28 Dec 2016 17:00:00 +0000 (12:00 -0500)
committerPeter Eisentraut <peter_e@gmx.net>
Mon, 6 Mar 2017 18:31:47 +0000 (13:31 -0500)
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>
src/backend/commands/opclasscmds.c
src/backend/parser/gram.y
src/include/nodes/parsenodes.h

index 5f2364bccf61077457c71cbf36d4f1f02b441164..9bd50a3bec8ea6f1c0bd2c0b745eb6591e2344c7 100644 (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;
index 29fde33b2b5ccdf93e63980bb4c1fcfcc43ca2fe..e7845906b4307fbf16231bf05397e80e435e85d3 100644 (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;
                                }
                ;
index 5afc3ebea04489ed58af9f5046a27f5e6f072ef2..a9d0d08b53bc72461fc90a76e923d19e39e17982 100644 (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;