Re: [SQL] UNIQUE constraint - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] UNIQUE constraint
Date
Msg-id 23088.935416867@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SQL] UNIQUE constraint  ("Mihai Barbos" <barbos@moon.ro>)
List pgsql-sql
"Mihai Barbos" <barbos@moon.ro> writes:
> My fault, the correct situation is
> create table TEST    (
>     testkey    something    PRIMARY KEY,
>     testval    something    UNIQUE,
>          .....................
> );

> PRIMARY KEY works OK, but UNIQUE is ignored.

Oh, OK: that bug was noticed and fixed a couple of weeks ago.  If you
have *both* a PRIMARY KEY and a UNIQUE on a different field, the UNIQUE
gets dropped --- both 6.5 and 6.5.1 have this mistake.  See the patch
Thomas Lockhart posted a week or two back.
        regards, tom lane


pgsql-sql by date:

Previous
From: José Soares
Date:
Subject: Re: [SQL] selecting newer rows
Next
From: "Steffen E. Thorkildsen"
Date:
Subject: PostgreSQL locking problem (II)