Re: foreign keys?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: foreign keys?
Дата
Msg-id Pine.BSF.4.21.0107211446160.48331-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на foreign keys?  (Jeremy Hansen <jeremy@xxedgexx.com>)
Список pgsql-general
On Sat, 21 Jul 2001, Jeremy Hansen wrote:

>
> dta=> UPDATE test1 SET test_col=2;
> ERROR:  <unnamed> referential integrity violation - key in test1 still
> referenced from test2
>
> I'm following the example in the elephant book on foreign keys and I'm
> getting the above error on an update.  Has something changed on how
> foreign keys work?
>
> Thanks for any help.
>
> My goal is to have another table update itself from a change in the
> primary key of another table.  Foreign keys is what I should be using,
> right?

Is the foreign key defined with ON UPDATE CASCADE?



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

Предыдущее
От: "Mitch Vincent"
Дата:
Сообщение: Re: How Postgresql Compares For Query And Load Operations
Следующее
От: Tom Lane
Дата:
Сообщение: Re: COPY failure