Adding UNIQUE constraint on NULL column

From: Dave Smith <dave(dot)smith(at)candata(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Adding UNIQUE constraint on NULL column
Date: 2005-01-13 14:01:08
Message-ID: 1105624867.17160.9.camel@playpen.candata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am trying to add a unique constraint on a column that can be null. The
documentation states that null is treated as non equal values but I want
them to be equal. Is there another way of doing this other than writing
a before insert trigger?

--
Dave Smith
CANdata Systems Ltd
416-493-9020

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marek Lewczuk 2005-01-13 14:14:36 Trace triggers
Previous Message Greg Stark 2005-01-13 13:59:31 Re: [HACKERS] Much Ado About COUNT(*)