Re: PRIMARY KEY on a *group* of columns imply that each column is NOT - Mailing list pgsql-general

From Tom Lane
Subject Re: PRIMARY KEY on a *group* of columns imply that each column is NOT
Date
Msg-id 21937.1114611990@sss.pgh.pa.us
Whole thread Raw
In response to Re: PRIMARY KEY on a *group* of columns imply that each column is NOT  (Stephane Bortzmeyer <bortzmeyer@nic.fr>)
Responses Re: PRIMARY KEY on a *group* of columns imply that each column is NOT  (Stephane Bortzmeyer <bortzmeyer@nic.fr>)
List pgsql-general
Stephane Bortzmeyer <bortzmeyer@nic.fr> writes:
> Yes, PostgreSQL is right and implement the standard. Now, what's the
> rationale for the standard? I understand it for a single column but,
> for several columns, it should be still possible to have different
> tuples, such as (3, NULL) and (5, NULL) for instance.

If that's what you want, declare it as UNIQUE not PRIMARY KEY.

            regards, tom lane

pgsql-general by date:

Previous
From: Stephane Bortzmeyer
Date:
Subject: Re: PRIMARY KEY on a *group* of columns imply that each column is NOT
Next
From: Scott Marlowe
Date:
Subject: Re: PRIMARY KEY on a *group* of columns imply that each