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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tuomas Leikola <tuomas(dot)leikola(at)gmail(dot)com>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: uniqueness and null could benefit from a hint for dba
Date: 2019-10-24 14:31:44
Message-ID: 20191024143144.GE8650@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

On Wed, Oct 23, 2019 at 02:35:02PM +0300, Tuomas Leikola wrote:
> That is a nice design. You can create a regular unique index where columns(s)s
> are not null and then filtered index(es) for the cases where some of the unique
> columns are null.
>
> However my point, specifically, was that if the document in question would have
> offered alternative solutions, I personally would have been saved from some
> frustration and an exercise in bad index design (I had 5 nullables that need
> uniqueness for the null as well). Maybe it would help someone else.

Uh, I am wondering if it is just too details for our docs. Can you
think of some text and its location?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2019-10-24 15:17:06 Instead of using the bloom index, a parallel sequencial scan is used with this example
Previous Message PG Doc comments form 2019-10-24 13:06:45 wal_sender_timeout / wal_receiver_timeout - seconds or milliseconds?