Re: Note new NULLS NOT DISTINCT on unique index tutorial page
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Corey Huinker <corey.huinker@gmail.com>
Cc: David Gilman <davidgilman1@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-04-18T03:22:36Z
Lists: pgsql-hackers
On Tue, 18 Apr 2023 at 05:01, Corey Huinker <corey.huinker@gmail.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
Commits
-
Doc: clarify NULLS NOT DISTINCT use in unique indexes
- 94d73f9abdf1 15.3 landed
- 0d0aeb04c127 16.0 landed