Commit c7d65a25 authored by Tom Lane's avatar Tom Lane

part_strategy does not need its very own keyword classification.

This should be plain old ColId.  Making it so makes the grammar less
complicated, and makes the compiled tables a kilobyte or so smaller
(likely because they don't have to deal with a keyword classification
that's not used anyplace else).
parent 67b0b2db
...@@ -595,7 +595,6 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query); ...@@ -595,7 +595,6 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
%type <boolean> opt_if_not_exists %type <boolean> opt_if_not_exists
%type <ival> generated_when override_kind %type <ival> generated_when override_kind
%type <partspec> PartitionSpec OptPartitionSpec %type <partspec> PartitionSpec OptPartitionSpec
%type <str> part_strategy
%type <partelem> part_elem %type <partelem> part_elem
%type <list> part_params %type <list> part_params
%type <partboundspec> PartitionBoundSpec %type <partboundspec> PartitionBoundSpec
...@@ -3894,7 +3893,7 @@ OptPartitionSpec: PartitionSpec { $$ = $1; } ...@@ -3894,7 +3893,7 @@ OptPartitionSpec: PartitionSpec { $$ = $1; }
| /*EMPTY*/ { $$ = NULL; } | /*EMPTY*/ { $$ = NULL; }
; ;
PartitionSpec: PARTITION BY part_strategy '(' part_params ')' PartitionSpec: PARTITION BY ColId '(' part_params ')'
{ {
PartitionSpec *n = makeNode(PartitionSpec); PartitionSpec *n = makeNode(PartitionSpec);
...@@ -3906,10 +3905,6 @@ PartitionSpec: PARTITION BY part_strategy '(' part_params ')' ...@@ -3906,10 +3905,6 @@ PartitionSpec: PARTITION BY part_strategy '(' part_params ')'
} }
; ;
part_strategy: IDENT { $$ = $1; }
| unreserved_keyword { $$ = pstrdup($1); }
;
part_params: part_elem { $$ = list_make1($1); } part_params: part_elem { $$ = list_make1($1); }
| part_params ',' part_elem { $$ = lappend($1, $3); } | part_params ',' part_elem { $$ = lappend($1, $3); }
; ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment