Skip to content

Add support for PostgreSQL CREATE RULE - #2433

Open
LucaCappelletti94 wants to merge 1 commit into
apache:mainfrom
LucaCappelletti94:pg-create-rule
Open

LucaCappelletti94 wants to merge 1 commit 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

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.85106% with 18 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.09%. Comparing base (bfc7d38) to head (00a9885).

Files with missing lines Patch % Lines
src/parser/mod.rs 76.78% 4 Missing and 9 partials ⚠️
src/ast/ddl.rs 88.88% 1 Missing and 3 partials ⚠️
src/ast/spans.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2433      +/-   ##
==========================================
- Coverage   81.09%   81.09%   -0.01%     
==========================================
  Files          42       42              
  Lines       33682    33776      +94     
  Branches    33682    33776      +94     
==========================================
+ Hits        27316    27392      +76     
- Misses       2796     2802       +6     
- Partials     3570     3582      +12     

☔ 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants