Re: How to create unique constraint on NULL columns

From: "Andrus" <eetasoft(at)online(dot)ee>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to create unique constraint on NULL columns
Date: 2005-07-18 11:39:06
Message-ID: dbg5ji$2hei$3@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


> I was faced with a similar issue. One suggestion I got from the Internet
> was to create a shadow column that contains the values used in the Index,
> with a dummy entry (in my case, the string <NULL>) for those records in
> which the primary column is NULL. It works well for my app.

Michael,

thank you.
This is not working in my case. Uniquenes sis not sufficient: I need
referential integrity with uniqueness. If I add <NULL> department, this must
be added into department table also and pollutes this table.

Andrus.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Esposito 2005-07-18 11:47:52 Re: index bloat
Previous Message Andrus 2005-07-18 11:35:16 Re: How to create unique constraint on NULL columns