Repository navigation
feat(backend): add PostgreSQL constraint support protocol - #27
Merged
vistart merged 3 commits intoApr 11, 2026
Merged
Conversation
Add PostgreSQL-specific constraint DDL formatting directly in PostgresDialect (not via mixin override, due to Python C3 MRO placing SQLDialectBase before mixins): - EXCLUDE constraint support with USING, elements, WHERE, DEFERRABLE - NOT VALID suffix for skipping validation of existing rows - format_add_table_constraint_action overrides base class for PG extensions - PostgresConstraintMixin retained as organizational placeholder Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add PostgresConstraintSupport protocol for PostgreSQL-proprietary constraint features (NOT VALID, EXCLUDE constraints) - Implement supports_constraint_enforced() returning False (PostgreSQL uses NOT VALID instead of ENFORCED/NOT ENFORCED) - Add supports_constraint_novalidate() and supports_exclude_constraint() to PostgresConstraintMixin
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release/v1.0.0.dev10 #27 +/- ##
========================================================
- Coverage 72.98% 72.51% -0.48%
========================================================
Files 126 128 +2
Lines 7193 7261 +68
Branches 1178 1194 +16
========================================================
+ Hits 5250 5265 +15
- Misses 1512 1565 +53
Partials 431 431
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
4 of 12 tasks
vistart
added a commit
that referenced
this pull request
Apr 12, 2026
* feat(postgres): add constraint DDL support with EXCLUDE and NOT VALID Add PostgreSQL-specific constraint DDL formatting directly in PostgresDialect (not via mixin override, due to Python C3 MRO placing SQLDialectBase before mixins): - EXCLUDE constraint support with USING, elements, WHERE, DEFERRABLE - NOT VALID suffix for skipping validation of existing rows - format_add_table_constraint_action overrides base class for PG extensions - PostgresConstraintMixin retained as organizational placeholder Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(backend): add PostgreSQL constraint support protocol - Add PostgresConstraintSupport protocol for PostgreSQL-proprietary constraint features (NOT VALID, EXCLUDE constraints) - Implement supports_constraint_enforced() returning False (PostgreSQL uses NOT VALID instead of ENFORCED/NOT ENFORCED) - Add supports_constraint_novalidate() and supports_exclude_constraint() to PostgresConstraintMixin * chore: add changelog fragment for PR #27 --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.



Description
Adds # (issue)
Type of change
feat: A new featuredocs: Documentation only changes (if related to the new feature)perf: A code change that improves performance (if part of the feature)test: Adding missing tests or correcting existing tests (for the new feature)chore: Changes to the build process or auxiliary tools and libraries suchs as documentation generation (if related to the new feature)ci: Changes to our CI configuration files and scripts (if related to the new feature)build: Changes that affect the build system or external dependencies (if related to the new feature)revert: Reverts a previous commitBreaking Change
Related Repositories/Packages
Testing
Test Plan:
Checklist
README.md, etc.).changelog.d/<issue_number>.<type>.md).Additional Notes
Commits in this PR:
a7639bafeat(postgres): add constraint DDL support with EXCLUDE and NOT VALID0ea068efeat(backend): add PostgreSQL constraint support protocol