Skip to content

Commit e52e455

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

File tree

5 files changed

+11143
-10905
lines changed

5 files changed

+11143
-10905
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
;

src/lib/postgresql/PostgreSqlParser.interp

+3-1
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)