Re: Add Foreign Keys To Table

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Add Foreign Keys To Table
Дата
Msg-id alpine.LNX.2.00.1107071304590.20399@salmo.appl-ecosys.com
обсуждение исходный текст
Ответ на Re: Add Foreign Keys To Table  (John R Pierce <pierce@hogranch.com>)
Список pgsql-general
On Thu, 7 Jul 2011, John R Pierce wrote:

> Since your PK of station_type is a composite, your foreign key must also be
> composite.
>
> CREATE TABLE stuffed (
>    id serial;
>    otherestuffs text;
>    sta varchar(50),
>    sec varchar(50),
>    FOREIGN KEY (sta, sec) REFERENCES station_type(sta_type, secondary_type)
> );

   Thanks, John, for showing me how to apply this approach.

Rich

В списке pgsql-general по дате отправления:

Предыдущее
От: Dave Coventry
Дата:
Сообщение: Re: Insufficient privileges.
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Add Foreign Keys To Table