Re: Add Foreign Keys To Table

Поиск
Список
Период
Сортировка
От Rich Shepard
Тема Re: Add Foreign Keys To Table
Дата
Msg-id alpine.LNX.2.00.1107071411480.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:

> if your original table has Primary Key of (sta_type, secondary_type) I
> would not expect EITHER of those fields to be unique by themselves....
> Surely there can be more than one of the same sta_type with different
> secondary_type's, just as there could be more than one secondary_type with
> different sta_types....  if either of these fields is unique of and by
> itself, it doesn't make sense to use the combined primary key.

John,

   Ah, yes. Of course. That's why the compound primary key is required. I'll
redo the table the proper way.

Thanks,

Rich

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

Предыдущее
От: "David Johnston"
Дата:
Сообщение: Re: Add Foreign Keys To Table
Следующее
От: "David Johnston"
Дата:
Сообщение: Re: Trying to find miss and mister of the last month with highest rating