Re: Adding UNIQUE constraint on NULL column

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: Doug McNaught <doug(at)mcnaught(dot)org>
Cc: Dave Smith <dave(dot)smith(at)candata(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Adding UNIQUE constraint on NULL column
Date: 2005-01-13 20:16:39
Message-ID: 1105647399.24795.97.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 2005-01-13 at 11:02, Doug McNaught wrote:
> Dave Smith <dave(dot)smith(at)candata(dot)com> writes:
>
> > On Thu, 2005-01-13 at 10:12, Doug McNaught wrote:
>
> >> Are you really saying that you want 'NULL = NULL' to return 't'?
>
> > Yes
>
> Well, that's not how NULL works.

In this instance, just create an artificial NULL, like a text string of
"NONE" and insert that.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael Fuhr 2005-01-13 20:37:36 Re: Functions returning RECORD
Previous Message Rick Schumeyer 2005-01-13 20:09:08 best place to enfore rules