Re: Dual Primary keys

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Bantamess" <bantamess(at)yahoo(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Dual Primary keys
Date: 2004-02-04 16:22:06
Message-ID: 13518.1075911726@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

"Bantamess" <bantamess(at)yahoo(dot)co(dot)uk> writes:
> Hello can any body tell me how to code a table with dual primary keys?

Do you mean a two-column composite primary key? Two independent primary
keys is nonsensical --- you should pick just one of them to be
considered the "primary" key.

If you want a composite primary key, the syntax is
primary key (f1, f2)

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2004-02-04 17:31:46 Re: Dual Primary keys
Previous Message Bruno Wolff III 2004-02-04 15:35:18 Re: Dual Primary keys