Re: Note new NULLS NOT DISTINCT on unique index tutorial page

Corey Huinker <corey.huinker@gmail.com>

From: Corey Huinker <corey.huinker@gmail.com>
To: David Gilman <davidgilman1@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-04-17T17:01:37Z
Lists: pgsql-hackers
On Wed, Apr 12, 2023 at 10:40 AM David Gilman <davidgilman1@gmail.com>
wrote:

> The SQL Language part of the docs has a brief page on unique indexes.
> It doesn't mention the new NULLS NOT DISTINCT functionality on unique
> indexes and this is a good place to mention it, as it already warns
> the user about the old/default behavior.
>
>
I'm ok with the wording as-is, but perhaps we can phrase it as "distinct"
vs "not equal", thus leaning into the syntax a bit:

By default, null values in a unique column are considered distinct,
allowing multiple nulls in the column.


or maybe

By default, null values in a unique column are considered
<literal>DISTINCT</literal>, allowing multiple nulls in the column.

Commits

  1. Doc: clarify NULLS NOT DISTINCT use in unique indexes