Re: uniqueness and null could benefit from a hint for dba

From: Tuomas Leikola <tuomas(dot)leikola(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: uniqueness and null could benefit from a hint for dba
Date: 2019-10-29 12:00:38
Message-ID: CALhc4GA=Bxs-w5Fo9x301-sWbBOcC7eQW=wTEEYUQhA1vA_Chg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Thu, Oct 24, 2019 at 5:31 PM Bruce Momjian <bruce(at)momjian(dot)us> wrote:

> Uh, I am wondering if it is just too details for our docs. Can you
> think of some text and its location?
>
>
"Unique indexes on functions can be used to create special types of
constraints, like considering unique values equal (coalesce) or only
allowing a single unique integer value of a float column (floor). A
filtered unique index only enforces uniqueness on the subset of rows that
match the filter."

I guess this would append to the paragraph "When an index is declared
unique, multiple table rows with equal indexed values are not allowed. Null
values are not considered equal. A multicolumn unique index will only
reject cases where all indexed columns are equal in multiple rows.". Links
to the mentioned keywords and concepts would of course be helpful, but not
strictly necessary.

I also thought of mentioning the caveat of (un)scannability of function or
filtered indexes but maybe that is a bit much.

--
- Tuomas

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Eugen Konkov 2019-10-29 15:54:36 Does 'instead of delete' trigger support modification of OLD
Previous Message Peter Eisentraut 2019-10-29 09:17:24 Re: doc correction