diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/parser/gram.y | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 1b06d358b50..542b09b4b0f 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -358,7 +358,7 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query); %type <list> privileges privilege_list %type <privtarget> privilege_target %type <objwithargs> function_with_argtypes aggregate_with_argtypes operator_with_argtypes -%type <list> function_with_argtypes_list +%type <list> function_with_argtypes_list aggregate_with_argtypes_list operator_with_argtypes_list %type <ival> defacl_privilege_target %type <defelt> DefACLOption %type <list> DefACLOptionList @@ -7495,6 +7495,12 @@ aggregate_with_argtypes: } ; +aggregate_with_argtypes_list: + aggregate_with_argtypes { $$ = list_make1($1); } + | aggregate_with_argtypes_list ',' aggregate_with_argtypes + { $$ = lappend($1, $3); } + ; + createfunc_opt_list: /* Must be at least one to prevent conflict */ createfunc_opt_item { $$ = list_make1($1); } @@ -7676,21 +7682,21 @@ opt_restrict: *****************************************************************************/ RemoveFuncStmt: - DROP FUNCTION function_with_argtypes opt_drop_behavior + DROP FUNCTION function_with_argtypes_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_FUNCTION; - n->objects = list_make1($3); + n->objects = $3; n->behavior = $4; n->missing_ok = false; n->concurrent = false; $$ = (Node *)n; } - | DROP FUNCTION IF_P EXISTS function_with_argtypes opt_drop_behavior + | DROP FUNCTION IF_P EXISTS function_with_argtypes_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_FUNCTION; - n->objects = list_make1($5); + n->objects = $5; n->behavior = $6; n->missing_ok = true; n->concurrent = false; @@ -7699,21 +7705,21 @@ RemoveFuncStmt: ; RemoveAggrStmt: - DROP AGGREGATE aggregate_with_argtypes opt_drop_behavior + DROP AGGREGATE aggregate_with_argtypes_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_AGGREGATE; - n->objects = list_make1($3); + n->objects = $3; n->behavior = $4; n->missing_ok = false; n->concurrent = false; $$ = (Node *)n; } - | DROP AGGREGATE IF_P EXISTS aggregate_with_argtypes opt_drop_behavior + | DROP AGGREGATE IF_P EXISTS aggregate_with_argtypes_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_AGGREGATE; - n->objects = list_make1($5); + n->objects = $5; n->behavior = $6; n->missing_ok = true; n->concurrent = false; @@ -7722,21 +7728,21 @@ RemoveAggrStmt: ; RemoveOperStmt: - DROP OPERATOR operator_with_argtypes opt_drop_behavior + DROP OPERATOR operator_with_argtypes_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_OPERATOR; - n->objects = list_make1($3); + n->objects = $3; n->behavior = $4; n->missing_ok = false; n->concurrent = false; $$ = (Node *)n; } - | DROP OPERATOR IF_P EXISTS operator_with_argtypes opt_drop_behavior + | DROP OPERATOR IF_P EXISTS operator_with_argtypes_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_OPERATOR; - n->objects = list_make1($5); + n->objects = $5; n->behavior = $6; n->missing_ok = true; n->concurrent = false; @@ -7768,6 +7774,12 @@ any_operator: { $$ = lcons(makeString($1), $3); } ; +operator_with_argtypes_list: + operator_with_argtypes { $$ = list_make1($1); } + | operator_with_argtypes_list ',' operator_with_argtypes + { $$ = lappend($1, $3); } + ; + operator_with_argtypes: any_operator oper_argtypes { |