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

Bruce Momjian <[email protected]> Thu, 24 Oct 2019 10:31:44 -0400
Newsgroups gmane.comp.db.postgresql.devel.documentation
Message-ID <[email protected]>
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  <[email protected]>        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 +