Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit c7d65a2

Browse files
committed
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).
1 parent 67b0b2d commit c7d65a2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/backend/parser/gram.y

+1-6
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,6 @@ static Node *makeRecursiveViewSelect(char *relname, List *aliases, Node *query);
595595
%type <boolean> opt_if_not_exists
596596
%type <ival> generated_when override_kind
597597
%type <partspec> PartitionSpec OptPartitionSpec
598-
%type <str> part_strategy
599598
%type <partelem> part_elem
600599
%type <list> part_params
601600
%type <partboundspec> PartitionBoundSpec
@@ -3894,7 +3893,7 @@ OptPartitionSpec: PartitionSpec { $$ = $1; }
38943893
| /*EMPTY*/ { $$ = NULL; }
38953894
;
38963895

3897-
PartitionSpec: PARTITION BY part_strategy '(' part_params ')'
3896+
PartitionSpec: PARTITION BY ColId '(' part_params ')'
38983897
{
38993898
PartitionSpec *n = makeNode(PartitionSpec);
39003899

@@ -3906,10 +3905,6 @@ PartitionSpec: PARTITION BY part_strategy '(' part_params ')'
39063905
}
39073906
;
39083907

3909-
part_strategy: IDENT { $$ = $1; }
3910-
| unreserved_keyword { $$ = pstrdup($1); }
3911-
;
3912-
39133908
part_params: part_elem { $$ = list_make1($1); }
39143909
| part_params ',' part_elem { $$ = lappend($1, $3); }
39153910
;

0 commit comments

Comments
 (0)