Re: UNIQUE INDEX and PRIMARY KEY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kynn Jones" <kynnjo(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: UNIQUE INDEX and PRIMARY KEY
Date: 2007-10-20 19:44:04
Message-ID: 12193.1192909444@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Kynn Jones" <kynnjo(at)gmail(dot)com> writes:
> In short, my question is: is there a way to designate a pre-existing
> UNIQUE INDEX (based on data contained in NOT NULL fields) as the basis
> for a table's PRIMARY KEY?

No. If there were, that client software you mention would very likely
still get confused. Both the SQL standard and a lot of code assume
that the constituents of a PRIMARY KEY are just-plain-columns.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rainer Bauer 2007-10-20 20:15:27 Re: 8.2.3: Server crashes on Windows using Eclipse/Junit
Previous Message Kynn Jones 2007-10-20 18:51:09 UNIQUE INDEX and PRIMARY KEY