Skip to content

Commit

Permalink
Support generic dialect
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jul 8, 2024
1 parent a3a4996 commit 25d6a40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/parser/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6274,7 +6274,7 @@ impl<'a> Parser<'a> {
self.expect_keyword(Keyword::WITH)?;
let table_name = self.parse_object_name(false)?;
AlterTableOperation::SwapWith { table_name }
} else if dialect_of!(self is PostgreSqlDialect)
} else if dialect_of!(self is PostgreSqlDialect | GenericDialect)
&& self.parse_keywords(&[Keyword::OWNER, Keyword::TO])
{
let next_token = self.next_token();
Expand Down
2 changes: 1 addition & 1 deletion tests/sqlparser_postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ fn parse_alter_table_owner_to() {
];

for case in test_cases {
match pg().verified_stmt(case.sql) {
match pg_and_generic().verified_stmt(case.sql) {
Statement::AlterTable {
name,
if_exists: _,
Expand Down

0 comments on commit 25d6a40

Please sign in to comment.