Re: How to create unique constraint on NULL columns - Mailing list pgsql-general

From Andrus
Subject Re: How to create unique constraint on NULL columns
Date
Msg-id dbg5ji$2hei$3@news.hub.org
Whole thread Raw
In response to How to create unique constraint on NULL columns  ("Andrus" <eetasoft@online.ee>)
Responses Re: How to create unique constraint on NULL columns
List 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.



pgsql-general by date:

Previous
From: "Andrus"
Date:
Subject: Re: How to create unique constraint on NULL columns
Next
From: "Andrus"
Date:
Subject: Re: (Win32 Postgres) Slow to Connect first - OK afterwards