Re: re: 7.1.2 and foreign key unique constraint.

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: re: 7.1.2 and foreign key unique constraint.
Дата
Msg-id Pine.BSF.4.21.0108021509000.12797-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на re: 7.1.2 and foreign key unique constraint.  (patrick keshishian <patrick+pgsql@pioneerdigital.com>)
Ответы Re: re: 7.1.2 and foreign key unique constraint.  (patrick keshishian <patrick+pgsql@pioneerdigital.com>)
Список pgsql-general
> I ran accross this problem upon upgrading our database from 7.0.3
> to 7.1.2:
>
>    ERROR:  UNIQUE constraint matching given keys for referenced
>    table "some_table" not found

Yeah, we fixed this to follow spec (sql actually requires that the
references be to a unique or primary key constraint)

For references to news_stories, you probably need to break news_stories
into two more normalized tables that actually have candidate keys.
I'd guess one would be id and fields that depend only on id and the other
would be id, media type and fields that depend on both of those.

I'm not so sure for the other constraint (still trying to think that case
through)


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

Предыдущее
От: "Jim Ballard"
Дата:
Сообщение: timestamp with time zone
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Timestamp with time zone issue