Thread: CREATE UNIQUE INDEX name ON table (column [, ...]) [ NULLS [ NOT ] DISTINCT ];

CREATE UNIQUE INDEX name ON table (column [, ...]) [ NULLS [ NOT ] DISTINCT ];

From
PG Doc comments form
Date:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/17/indexes-unique.html
Description:

This says it works from 12 onwards but actually from 15 onwards
Prior to 15 unique partial indexes needed creating, e.g. (parent_ID, NAME)
where parent_ID is not null and (NAME) where parent_id is null

Hello Tim,

On 2024-Nov-10, PG Doc comments form wrote:

> The following documentation comment has been logged on the website:
> 
> Page: https://www.postgresql.org/docs/17/indexes-unique.html
> Description:
> 
> This says it works from 12 onwards but actually from 15 onwards
> Prior to 15 unique partial indexes needed creating, e.g. (parent_ID, NAME)
> where parent_ID is not null and (NAME) where parent_id is null

I don't find any text on that page that says this is supported from 12
onwards (click on the number above and you get a different page).  If
you go to the page for version 14, the NULLS NOT DISTINCT bit is not
there.  Only in the page for version 15 does that text appear.

Thanks for reporting,

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/