Skip to content

Commit 7398dfe

Browse files
committed
fix(postgresql): change partitionboundspec from to grammar
1 parent d19bc6d commit 7398dfe

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/grammar/postgresql/PostgreSqlParser.g4

+11-1
Original file line numberDiff line numberDiff line change
@@ -505,10 +505,20 @@ reloption_elem
505505
partitionboundspec
506506
: KW_FOR KW_VALUES KW_WITH OPEN_PAREN KW_MODULUS numericonly COMMA KW_REMAINDER numericonly CLOSE_PAREN
507507
| KW_FOR KW_VALUES KW_IN execute_param_clause
508-
| KW_FOR KW_VALUES KW_FROM execute_param_clause KW_TO execute_param_clause
508+
| KW_FOR KW_VALUES KW_FROM partitionboundexpr KW_TO partitionboundexpr
509509
| KW_DEFAULT
510510
;
511511

512+
partitionboundexpr
513+
: OPEN_PAREN partitionboundchoose (COMMA partitionboundchoose)* CLOSE_PAREN
514+
;
515+
516+
partitionboundchoose
517+
: expr_list
518+
| KW_MINVALUE
519+
| KW_MAXVALUE
520+
;
521+
512522
altercompositetypestmt
513523
: KW_ALTER KW_TYPE any_name alter_type_cmd (COMMA alter_type_cmd)*
514524
;

0 commit comments

Comments
 (0)