Re: Multicolumn primary key with null value - Mailing list pgsql-general

From Adrian von Bidder
Subject Re: Multicolumn primary key with null value
Date
Msg-id 201004230952.01994@fortytwo.ch
Whole thread Raw
In response to Re: Multicolumn primary key with null value  (Craig Ringer <craig@postnewspapers.com.au>)
Responses Re: Multicolumn primary key with null value  (Craig Ringer <craig@postnewspapers.com.au>)
List pgsql-general
On Friday 23 April 2010 03.27:29 Craig Ringer wrote:
> insert into test (a,b) values ('fred',NULL);
> insert into test (a,b) values ('fred',NULL);
>
>
> ... and will succeed:

Hmm.  Perhaps not as ugly as "none" placeholders:

create unique index on test (b) where a is null;
create unique index on test (a) where b is null;

cheers
-- vbi

--
Protect your privacy - encrypt your email: http://fortytwo.ch/gpg/intro

Attachment

pgsql-general by date:

Previous
From: Jignesh Shah
Date:
Subject: Re: Issue in Improving the performance using prepared plan
Next
From: Adrian von Bidder
Date:
Subject: Re: Creating indexes?