Re: Dual Primary keys - Mailing list pgsql-novice

From Tom Lane
Subject Re: Dual Primary keys
Date
Msg-id 13518.1075911726@sss.pgh.pa.us
Whole thread Raw
In response to Dual Primary keys  ("Bantamess" <bantamess@yahoo.co.uk>)
List pgsql-novice
"Bantamess" <bantamess@yahoo.co.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

pgsql-novice by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Dual Primary keys
Next
From: Josh Berkus
Date:
Subject: Re: Dual Primary keys