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

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
Cc: David Gilman <davidgilman1(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Note new NULLS NOT DISTINCT on unique index tutorial page
Date: 2023-04-18 03:22:36
Message-ID: CAApHDvrhZnq2hQ0PJXhyAUxpidQ9xfGrUSHXrLo-ZwbxqhD8JQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 18 Apr 2023 at 05:01, Corey Huinker <corey(dot)huinker(at)gmail(dot)com> wrote:
> 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.>

I acknowledge your input, but I didn't think either of these was an
improvement over what David suggested. I understand that many people
will know that "SELECT DISTINCT" and "WHERE x IS NOT DISTINCT FROM y"
means treat NULLs equally, but I don't think we should expect the
reader here to know that's what we're talking about. In any case,
we're talking about existing wording here, not something David is
adding.

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2023-04-18 04:34:00 Re: A Question about InvokeObjectPostAlterHook
Previous Message Peter Geoghegan 2023-04-18 03:19:30 Do we really need two xl_heap_lock records?