Skip to content

Support parenthesized CREATE TABLE ... (LIKE ... INCLUDING/EXCLUDING DEFAULTS) in PostgreSQL#2242

Open
LucaCappelletti94 wants to merge 1 commit intoapache:mainfrom
LucaCappelletti94:pg_query_parity_1
Open

Support parenthesized CREATE TABLE ... (LIKE ... INCLUDING/EXCLUDING DEFAULTS) in PostgreSQL#2242
LucaCappelletti94 wants to merge 1 commit intoapache:mainfrom
LucaCappelletti94:pg_query_parity_1

Conversation

@LucaCappelletti94
Copy link
Contributor

This PR fixes PostgreSQL parsing for:

  • CREATE TABLE new (LIKE old INCLUDING DEFAULTS)
  • CREATE TABLE new (LIKE old EXCLUDING DEFAULTS)

These are valid PostgreSQL forms, but were previously rejected.

The parser already supports INCLUDING/EXCLUDING DEFAULTS in maybe_parse_create_table_like, but that code path is gated by Dialect::supports_create_table_like_parenthesized(). PostgreSqlDialect did not enable that capability.

@LucaCappelletti94 LucaCappelletti94 marked this pull request as ready for review February 25, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant