Re: unique key issue - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: unique key issue
Date
Msg-id 20060919134941.GA1789@svana.org
Whole thread Raw
In response to unique key issue  ("Junkone" <junkone1@gmail.com>)
List pgsql-general
On Mon, Sep 18, 2006 at 03:54:05PM -0700, Junkone wrote:
> HI
> I have a table with a unique key constraint on col1,col2. The dattabase
> allowed an multiple inserts. here is how
>
> col1          col2
> 'abc'          <empty space>
> 'abc'          <empty space>

Depends on what you mean by <empty space>. If you mean NULL, then it's
according to the SQL standard. NULL <> NULL so those rows are not
equal.

If you mean some real value, then yes, that's wierd.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: vista
Next
From: Matthias.Pitzl@izb.de
Date:
Subject: Re: Access to databas from the Internet