Skip to content

PostgreSQL: Support LIKE among the columns of CREATE TABLE - #3030

Open
LucaCappelletti94 wants to merge 2 commits into
upstream/pg-create-table-like-optionsfrom
upstream/pg-create-table-like-mixed-elements
Open

LucaCappelletti94 wants to merge 2 commits into
upstream/pg-create-table-like-optionsfrom
upstream/pg-create-table-like-mixed-elements

Conversation

@LucaCappelletti94

Copy link
Copy Markdown
Contributor

PostgreSQL and Redshift list LIKE as one table element among columns and constraints, any number of times. Its position matters because PostgreSQL inserts the copied columns where the LIKE stands, so (b int, LIKE a) puts b first.

LIKE is now parsed inside the column list, and CreateTableLikeKind::Parenthesized holds a Vec<CreateTableLikeElement>, each recording how many columns precede it so that Display writes it back in place.

@LucaCappelletti94
LucaCappelletti94 force-pushed the upstream/pg-create-table-like-mixed-elements branch from 33ba229 to 4f1a5ec Compare November 21, 2026 17:49
@codecov-commenter

codecov-commenter commented Nov 21, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.15385% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.61%. Comparing base (2f21800) to head (9aa21c4).

Files with missing lines Patch % Lines
src/parser/mod.rs 94.52% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@                            Coverage Diff                            @@
##           upstream/pg-create-table-like-options    #3030      +/-   ##
=========================================================================
+ Coverage                                  83.57%   83.61%   +0.03%     
=========================================================================
  Files                                         42       42              
  Lines                                      35706    35744      +38     
  Branches                                   35706    35744      +38     
=========================================================================
+ Hits                                       29841    29887      +46     
+ Misses                                      2435     2433       -2     
+ Partials                                    3430     3424       -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants