Re: altering table - Mailing list pgsql-general

From Stephan Szabo
Subject Re: altering table
Date
Msg-id 20030409072151.A65184-100000@megazone23.bigpanda.com
Whole thread Raw
In response to altering table  ("Riza Fahmi" <riza.fahmi@myrealbox.com>)
List pgsql-general
On Wed, 9 Apr 2003, Riza Fahmi wrote:

> How to use alter table to add foreign key more than one field? Thanks
> for the attention

If you mean a multi-column foreign key:

alter table foo add constraint name foreign key (col1, col2, col3)
references bar(pcol1, pcol2,pcol3);

[The columns on bar are unnecessary if you're referencing the primary key]


pgsql-general by date:

Previous
From: Joshua Moore-Oliva
Date:
Subject: Re: aaagh... postgres is segfaulting? -- fix
Next
From: Michal Taborsky
Date:
Subject: CREATE USER from within function