Repository navigation
PostgreSQL: Parse NULLS [NOT] DISTINCT on column UNIQUE constraints - #2738
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2738 +/- ##
==========================================
+ Coverage 82.38% 82.40% +0.01%
==========================================
Files 42 42
Lines 35339 35342 +3
Branches 35339 35342 +3
==========================================
+ Hits 29115 29122 +7
Misses 2678 2678
+ Partials 3546 3542 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
sabir-akhadov-localstack
approved these changes
Oct 28, 2026
LucaCappelletti94
force-pushed
the
upstream/unique-nulls-not-distinct
branch
from
October 28, 2026 11:29
eceeccc to
8d4569a
Compare
Contributor
Author
|
Thanks @sabir-akhadov-localstack for the review, I will now merge the PR. cc @alamb |
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.
CREATE TABLE t (u INT UNIQUE NULLS NOT DISTINCT)failed withExpected: ',' or ')' after column definition, found: NULLS. PostgreSQL 15 and later acceptNULLS [ NOT ] DISTINCTafter a column'sUNIQUE(https://www.postgresql.org/docs/current/sql-createtable.html), and sqlparser already parses the modifier on a table-levelUNIQUEconstraint and onCREATE INDEX.The column option now reads the modifier into the
nulls_distinctfield thatUniqueConstraintalready carries for the table-level form and prints it back. Like the table-level form, it is not gated on a dialect.