Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support column_list in CONTAINS #521

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion src/backend/parser/gram.y
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ fix_domain_typmods_hook_type fix_domain_typmods_hook = NULL;
%type <ival> Iconst SignedIconst
%type <str> Sconst comment_text notify_payload
%type <str> RoleId opt_boolean_or_string
%type <list> var_list
%type <list> var_list opt_var_name_list var_name_list opt_var_name
%type <str> ColId ColIdDef ColLabel BareColLabel AS_ColLabel
%type <str> NonReservedWord NonReservedWord_or_Sconst
%type <str> var_name type_function_name param_name
Expand Down Expand Up @@ -1826,6 +1826,18 @@ set_rest_more: /* Generic SET syntaxes: */
}
;

opt_var_name_list: '(' var_name_list ')' { $$ = $2; }
| /*EMPTY*/ { $$ = NIL; }
;

var_name_list: var_name { $$ = list_make1($1); }
| var_name_list ',' var_name
{$$ = lappend($1, $3); }
;

opt_var_name: var_name { $$ = list_make1($1); }
;

var_name: ColId { $$ = $1; }
| var_name '.' ColId
{ $$ = psprintf("%s.%s", $1, $3); }
Expand Down