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

From Michael Schmidt
Subject Re: How to create unique constraint on NULL columns
Date
Msg-id BAY101-DAV12809A20C96F25A74A08D1A3D30@phx.gbl
Whole thread Raw
In response to How to create unique constraint on NULL columns  ("Andrus" <eetasoft@online.ee>)
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.

pgsql-general by date:

Previous
From: Garrett Kalleberg
Date:
Subject: foreign key constraints and inheritence
Next
From: Ron Mayer
Date:
Subject: Re: Converting MySQL tinyint to PostgreSQL