add constraints? - Mailing list pgsql-general

From Dmitry Sorokin
Subject add constraints?
Date
Msg-id Pine.LNX.4.21.0010231746530.14273-100000@ics.elcom.ru
Whole thread Raw
List pgsql-general
Hi,

How may I add multicolumns primary key to the existent table and then
add foreign key constraint references to it for another existent table?
In this case I can only add primary key by creating unique index, right?
May I count if I create multicolumn (unique??) index the next command

alter table <tblname> add contraint <constrname> foreign key
    (..) references <that_indexed_table_name>

will treat that index as primary key definition?

Thanks,
Dmitry Sorokin
ds@ics.elcom.ru



pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: How does TOAST compare to other databases' mechanisms?
Next
From: "Diehl, Jeffrey"
Date:
Subject: RE: MySQL -> pgsql