Skip to content

Add support for PostgreSQL CREATE RULE - #2433

Open
LucaCappelletti94 wants to merge 3 commits into
apache:mainfrom
LucaCappelletti94:pg-create-rule
Open

LucaCappelletti94 wants to merge 3 commits into
apache:mainfrom
LucaCappelletti94:pg-create-rule

Conversation

@LucaCappelletti94

@LucaCappelletti94 LucaCappelletti94 commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

The parser does not recognize CREATE RULE at all, so any PostgreSQL schema that defines rewrite rules fails to parse. pg_dump emits rules whenever a schema has them, which makes complete schema dumps unparseable.

Documentation: https://www.postgresql.org/docs/current/sql-createrule.html

@LucaCappelletti94
LucaCappelletti94 marked this pull request as ready for review August 7, 2026 06:33
@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-create-rule branch 3 times, most recently from 2eaf253 to 9875834 Compare August 24, 2026 11:54
@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-create-rule branch 5 times, most recently from 8e15e35 to d92c794 Compare September 22, 2026 21:20
LucaCappelletti94 added a commit to LucaCappelletti94/sqlparser-rs that referenced this pull request Oct 1, 2026
@codecov-commenter

codecov-commenter commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.59%. Comparing base (424378c) to head (429527a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2433      +/-   ##
==========================================
+ Coverage   81.52%   81.59%   +0.07%     
==========================================
  Files          42       42              
  Lines       34205    34309     +104     
  Branches    34205    34309     +104     
==========================================
+ Hits        27885    27995     +110     
+ Misses       2770     2769       -1     
+ Partials     3550     3545       -5     

☔ 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.

@LucaCappelletti94
LucaCappelletti94 force-pushed the pg-create-rule branch 2 times, most recently from 7a4d1c0 to 54305a6 Compare October 17, 2026 08:09
@LucaCappelletti94 LucaCappelletti94 added enhancement New feature or request waiting on reviewer PR needs to be reviewed labels Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request PostgreSQL waiting on reviewer PR needs to be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants