PostgreSQL UNLOGGED Table Support and ALTER TABLE ... SET LOGGED|UNLOGGED#2251
Open
LucaCappelletti94 wants to merge 4 commits intoapache:mainfrom
Open
PostgreSQL UNLOGGED Table Support and ALTER TABLE ... SET LOGGED|UNLOGGED#2251LucaCappelletti94 wants to merge 4 commits intoapache:mainfrom
UNLOGGED Table Support and ALTER TABLE ... SET LOGGED|UNLOGGED#2251LucaCappelletti94 wants to merge 4 commits intoapache:mainfrom
Conversation
Add parser and AST support for PostgreSQL CREATE UNLOGGED TABLE and\nALTER TABLE ... SET LOGGED|UNLOGGED operations.\n\n- add LOGGED keyword\n- add CreateTable.unlogged and wire it through CreateTableBuilder\n- render UNLOGGED in CreateTable display\n- add AlterTableOperation::SetLogged and ::SetUnlogged display/spans\n- parse UNLOGGED only for PostgreSqlDialect|GenericDialect\n- parse ALTER TABLE SET LOGGED|UNLOGGED operations
Add PostgreSQL regression coverage for the new syntax support and\nupdate existing struct-literal CreateTable expectations with the\nnew unlogged field in cross-dialect tests.\n\n- add parse_create_unlogged_table\n- add parse_alter_table_set_logged_unlogged\n- set unlogged defaults in duckdb/mssql fixture assertions
Refactor parser match arms to use guards instead of nested if blocks where Clippy flagged collapsible_match. This keeps behavior unchanged while making control flow clearer in statement parsing, wildcard qualification handling, terminal keyword detection, and Hive row format delimiter parsing.
Refactor parse_alter_table_operation to collapse a nested else-if structure into a direct else-if chain for PostgreSQL/GEDERIC SET LOGGED and SET UNLOGGED handling. This is a no-behavior-change control-flow cleanup aligned with Clippy's collapsible_else_if lint under -D warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds parser and AST support for PostgreSQL table logging controls:
CREATE UNLOGGED TABLE ...ALTER TABLE ... SET LOGGEDALTER TABLE ... SET UNLOGGEDIt also adds regression tests and updates cross-dialect test fixtures impacted by the AST shape change.