Re: UNIQUE null treatment option
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Marko Tiikkaja <marko@joh.to>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-09-07T11:17:40Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add UNIQUE null treatment option
- 94aa7cc5f707 15.0 landed
On 27.08.21 14:44, Marko Tiikkaja wrote: > On Fri, Aug 27, 2021 at 3:38 PM Peter Eisentraut > <peter.eisentraut@enterprisedb.com > <mailto:peter.eisentraut@enterprisedb.com>> wrote: > > In the SQL:202x draft, this > has been formalized by making this implementation-defined and adding > an option on unique constraint definitions UNIQUE [ NULLS [NOT] > DISTINCT ] to choose a behavior explicitly. > > The CREATE UNIQUE INDEX syntax extension is not from the standard, > it's my own invention. > > > For the unique index syntax, should this be selectable per > column/expression, rather than for the entire index as a whole? Semantically, this would be possible, but the bookkeeping to make it work seems out of proportion with the utility. And you'd have the unique index syntax out of sync with the unique constraint syntax, which would be pretty confusing.