uniqueness and null could benefit from a hint for dba

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: tuomas(dot)leikola(at)gmail(dot)com
Subject: uniqueness and null could benefit from a hint for dba
Date: 2019-09-04 13:12:35
Message-ID: 156760275564.1127.12321702656456074572@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

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

Sometimes it is convenient to create an unique index that considers NULL
values equal. Designating a "zero" value for those rows might not be
feasible, for example due to a foreign key.

The documentation currently only states that unique indexes do not consider
NULLs equal. It might be good to offer workarounds, like indexing a coalesce
function, if scans are not the reason for the index, but the uniqueness
constraint.

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2019-09-04 13:41:43 Re: Release notes on "reserved OIDs"
Previous Message Andres Freund 2019-09-04 09:43:15 Re: Release notes on "reserved OIDs"