@@ -5137,18 +5137,18 @@ impl<'a> Parser<'a> {
51375137 let temporary = self
51385138 .parse_one_of_keywords(&[Keyword::TEMP, Keyword::TEMPORARY])
51395139 .is_some();
5140- let unlogged = dialect_of!(self is PostgreSqlDialect | GenericDialect)
5141- && self.parse_keyword(Keyword::UNLOGGED);
51425140 let persistent = dialect_of!(self is DuckDbDialect)
51435141 && self.parse_one_of_keywords(&[Keyword::PERSISTENT]).is_some();
51445142 let create_view_params = self.parse_create_view_params()?;
51455143 if self.peek_keywords(&[Keyword::SNAPSHOT, Keyword::TABLE]) {
51465144 self.parse_create_snapshot_table().map(Into::into)
5145+ } else if self.peek_keywords(&[Keyword::UNLOGGED, Keyword::TABLE]) {
5146+ self.expect_keywords(&[Keyword::UNLOGGED, Keyword::TABLE])?;
5147+ self.parse_create_table(or_replace, temporary, true, global, transient)
5148+ .map(Into::into)
51475149 } else if self.parse_keyword(Keyword::TABLE) {
5148- self.parse_create_table(or_replace, temporary, unlogged , global, transient)
5150+ self.parse_create_table(or_replace, temporary, false , global, transient)
51495151 .map(Into::into)
5150- } else if unlogged {
5151- self.expected_ref("TABLE after UNLOGGED", self.peek_token_ref())
51525152 } else if self.peek_keyword(Keyword::MATERIALIZED)
51535153 || self.peek_keyword(Keyword::VIEW)
51545154 || self.peek_keywords(&[Keyword::SECURE, Keyword::MATERIALIZED, Keyword::VIEW])
@@ -10670,13 +10670,9 @@ impl<'a> Parser<'a> {
1067010670 } else if self.parse_keywords(&[Keyword::VALIDATE, Keyword::CONSTRAINT]) {
1067110671 let name = self.parse_identifier()?;
1067210672 AlterTableOperation::ValidateConstraint { name }
10673- } else if dialect_of!(self is PostgreSqlDialect | GenericDialect)
10674- && self.parse_keywords(&[Keyword::SET, Keyword::LOGGED])
10675- {
10673+ } else if self.parse_keywords(&[Keyword::SET, Keyword::LOGGED]) {
1067610674 AlterTableOperation::SetLogged
10677- } else if dialect_of!(self is PostgreSqlDialect | GenericDialect)
10678- && self.parse_keywords(&[Keyword::SET, Keyword::UNLOGGED])
10679- {
10675+ } else if self.parse_keywords(&[Keyword::SET, Keyword::UNLOGGED]) {
1068010676 AlterTableOperation::SetUnlogged
1068110677 } else {
1068210678 let mut options =
0 commit comments