Skip to content

Commit

Permalink
fix(pgsql): (issue #255) select from support view name (#257)
Browse files Browse the repository at this point in the history
Co-authored-by: zhaoge <>
  • Loading branch information
Cythia828 authored Feb 5, 2024
1 parent ecbbee3 commit 337885b
Show file tree
Hide file tree
Showing 6 changed files with 15,445 additions and 15,278 deletions.
6 changes: 5 additions & 1 deletion src/grammar/pgsql/PostgreSQLParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -3258,7 +3258,7 @@ from_list

table_ref
: (
relation_expr opt_alias_clause? tablesample_clause?
(relation_expr | view_relation_expr) opt_alias_clause? tablesample_clause?
| func_table func_alias_clause?
| xmltable opt_alias_clause?
| select_with_parens opt_alias_clause?
Expand Down Expand Up @@ -3307,6 +3307,10 @@ relation_expr
| KW_IN KW_SCHEMA (schema_name | KW_CURRENT_SCHEMA)
;

view_relation_expr
: KW_ONLY? view_name STAR? columnlist? where_clause?
;

publication_relation_expr
: KW_TABLE KW_ONLY? table_name STAR? (OPEN_PAREN columnlist CLOSE_PAREN)? where_clause?
| KW_TABLE KW_ONLY ( table_name | OPEN_PAREN table_name CLOSE_PAREN)
Expand Down
3 changes: 2 additions & 1 deletion src/lib/pgsql/PostgreSQLParser.interp

Large diffs are not rendered by default.

Loading

0 comments on commit 337885b

Please sign in to comment.