diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index a24b30f06f1..e66b850e1a9 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -595,7 +595,6 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query); %type opt_if_not_exists %type generated_when override_kind %type PartitionSpec OptPartitionSpec -%type part_strategy %type part_elem %type part_params %type PartitionBoundSpec @@ -3894,7 +3893,7 @@ OptPartitionSpec: PartitionSpec { $$ = $1; } | /*EMPTY*/ { $$ = NULL; } ; -PartitionSpec: PARTITION BY part_strategy '(' part_params ')' +PartitionSpec: PARTITION BY ColId '(' part_params ')' { PartitionSpec *n = makeNode(PartitionSpec); @@ -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 { $$ = lappend($1, $3); } ;