Re: Create Table Unique problem... bug? - Mailing list pgsql-novice

From Bruno Wolff III
Subject Re: Create Table Unique problem... bug?
Date
Msg-id 20030528145107.GA4890@wolff.to
Whole thread Raw
In response to Create Table Unique problem... bug?  (Mauro Bertoli <bertolima@yahoo.it>)
List pgsql-novice
On Wed, May 28, 2003 at 15:34:41 +0200,
  Mauro Bertoli <bertolima@yahoo.it> wrote:
> INSERT INTO questiontypes (id,flags,label) values
> (2,null,'a');
>
> and re-insert it... I can!!!! Now there are two
> identical row, and UNIQUE??
> I think postgres must occur an error? Is it Ok?

This is how unique constraints work. Any null value is considered as
different from any other null value. If that isn't how you want things
to work, using some value other than null to represent whatever you
are using null to represent.

pgsql-novice by date:

Previous
From: Dani Oderbolz
Date:
Subject: Re: Create Table Unique problem... bug?
Next
From: papapep
Date:
Subject: Re: Inserting data of two other tables [Now deleting ...]