Skip to content

Commit 70f418d

Browse files
committed
fix(postgresql): change func_application to add column_name and ()
1 parent b835c4b commit 70f418d

File tree

3 files changed

+2266
-2696
lines changed

3 files changed

+2266
-2696
lines changed

src/grammar/postgresql/PostgreSqlParser.g4

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,7 +2395,10 @@ primaryExpression
23952395
| Numeric
23962396
| BinaryStringConstant
23972397
| HexadecimalStringConstant
2398-
| function_name (sconst | OPEN_PAREN func_arg_list sort_clause? CLOSE_PAREN sconst)
2398+
| function_name (
2399+
sconst
2400+
| OPEN_PAREN (column_name | func_arg_list) sort_clause? CLOSE_PAREN sconst
2401+
)
23992402
| consttypename? sconst
24002403
| KW_INTERVAL ( sconst opt_interval? | opt_float sconst)
24012404
| KW_TRUE
@@ -2423,15 +2426,13 @@ primaryExpression
24232426
;
24242427

24252428
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-
)?
2429+
: function_name OPEN_PAREN (
2430+
column_name
2431+
| func_arg_list (COMMA KW_VARIADIC func_arg_expr)? sort_clause?
2432+
| KW_VARIADIC func_arg_expr sort_clause?
2433+
| (KW_ALL | KW_DISTINCT) func_arg_list sort_clause?
2434+
| STAR
2435+
)? CLOSE_PAREN
24352436
;
24362437

24372438
func_expr

src/lib/postgresql/PostgreSqlParser.interp

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

0 commit comments

Comments
 (0)