Skip to content

Commit ae53b19

Browse files
authored
fix(postgresql): simplify grammar (#20)
* fix(postgresql): simplify grammar * fix: simplify
1 parent 73f6e68 commit ae53b19

File tree

6 files changed

+14208
-14376
lines changed

6 files changed

+14208
-14376
lines changed

postgresql/PostgreSQLParser.g4

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3038,29 +3038,27 @@ from_list
30383038
;
30393039

30403040
table_ref
3041-
: (relation_expr opt_alias_clause? tablesample_clause?
3042-
| func_table func_alias_clause?
3043-
| xmltable opt_alias_clause?
3044-
| select_with_parens opt_alias_clause?
3045-
| LATERAL_P (
3046-
xmltable opt_alias_clause?
3047-
| func_table func_alias_clause?
3048-
| select_with_parens opt_alias_clause?
3049-
)
3050-
| OPEN_PAREN table_ref (
3051-
CROSS JOIN table_ref
3052-
| NATURAL join_type? JOIN table_ref
3053-
| join_type? JOIN table_ref join_qual
3054-
)? CLOSE_PAREN opt_alias_clause?
3055-
)
3056-
joined_table*
3057-
;
3058-
3059-
joined_table
3060-
: join_type? JOIN table_ref join_qual
3061-
| CROSS JOIN table_ref
3062-
| NATURAL join_type? JOIN table_ref
3063-
;
3041+
: (
3042+
relation_expr opt_alias_clause? tablesample_clause?
3043+
| func_table func_alias_clause?
3044+
| xmltable opt_alias_clause?
3045+
| select_with_parens opt_alias_clause?
3046+
| LATERAL_P (
3047+
xmltable opt_alias_clause?
3048+
| func_table func_alias_clause?
3049+
| select_with_parens opt_alias_clause?
3050+
)
3051+
| OPEN_PAREN table_ref (
3052+
CROSS JOIN table_ref
3053+
| NATURAL join_type? JOIN table_ref
3054+
| join_type? JOIN table_ref join_qual
3055+
)? CLOSE_PAREN opt_alias_clause?
3056+
) (
3057+
CROSS JOIN table_ref
3058+
| NATURAL join_type? JOIN table_ref
3059+
| join_type? JOIN table_ref join_qual
3060+
)*
3061+
;
30643062

30653063
alias_clause
30663064
: AS? colid (OPEN_PAREN name_list CLOSE_PAREN)?

0 commit comments

Comments
 (0)