Add support for NULLS [NOT] DISTINCT to UniqueConstraint
PostgresSQL 15 is one of the first databases to implement the F292 SQL feature present in the 2023 standard that allows to specify whether or not null values should be considered as distinct in unique constraints.
While most backends default to implicit NULLS DISTINCT
some backends don't, most notably SQL Server (cff59bedc23fd4d53557f677ddc42402b56963d0).
I suggest we add a nulls_distinct:Optional[bool]=None
option to UniqueConstraint
so it preserves it's default to backend treatment of nulls behaviour while allowing it to be set explicitly on backends that support it.
Change History
(6)
Description: |
modified (diff)
|
Triage Stage: |
Unreviewed → Accepted
|
Has patch: |
set
|
Owner: |
changed from nobody to Simon Charette
|
Triage Stage: |
Accepted → Ready for checkin
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
In 595a2ab: