Skip to content

Commit 9a5eda8

Browse files
authored
fix(postgresql): change func_application to add column_name and paren (#359)
* fix(postgresql): change func_application to add column_name and () * fix(postgresql): add column_name into func_arg_expr
1 parent d7b94df commit 9a5eda8

File tree

3 files changed

+2058
-2508
lines changed

3 files changed

+2058
-2508
lines changed

src/grammar/postgresql/PostgreSqlParser.g4

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2423,15 +2423,12 @@ primaryExpression
24232423
;
24242424

24252425
func_application
2426-
: function_name (
2427-
OPEN_PAREN (
2428-
func_arg_list (COMMA KW_VARIADIC func_arg_expr)? sort_clause?
2429-
| KW_VARIADIC func_arg_expr sort_clause?
2430-
| (KW_ALL | KW_DISTINCT) func_arg_list sort_clause?
2431-
| STAR
2432-
|
2433-
) CLOSE_PAREN
2434-
)?
2426+
: function_name OPEN_PAREN (
2427+
func_arg_list (COMMA KW_VARIADIC func_arg_expr)? sort_clause?
2428+
| KW_VARIADIC func_arg_expr sort_clause?
2429+
| (KW_ALL | KW_DISTINCT) func_arg_list sort_clause?
2430+
| STAR
2431+
)? CLOSE_PAREN
24352432
;
24362433

24372434
func_expr
@@ -2599,7 +2596,8 @@ func_arg_list
25992596
;
26002597

26012598
func_arg_expr
2602-
: expression
2599+
: column_name
2600+
| expression
26032601
| type_function_name (COLON_EQUALS | EQUALS_GREATER) expression
26042602
;
26052603

src/lib/postgresql/PostgreSqlParser.interp

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)