Re: delete cascade not working

Поиск
Список
Период
Сортировка
От Joshua Tolley
Тема Re: delete cascade not working
Дата
Msg-id 20090425201103.GB15830@eddie
обсуждение исходный текст
Ответ на delete cascade not working  (Kenneth Tilton <kentilton@gmail.com>)
Ответы Re: delete cascade not working  (Kenneth Tilton <kentilton@gmail.com>)
Список pgsql-general
On Sat, Apr 25, 2009 at 04:01:20PM -0400, Kenneth Tilton wrote:
> Given constraint:
>
> ALTER TABLE provider_input.common
>   ADD CONSTRAINT common_pin_file_load_sid_fkey FOREIGN KEY
> (pin_file_load_sid)
>       REFERENCES provider_input.file_load (sid) MATCH FULL
>       ON UPDATE NO ACTION ON DELETE CASCADE;

<snip>

> I do not actually instantiate common, I have a table that inherits from
> that. I will play around now to see if that is an issue, thought I'd
> send up a flare here at the same time.

First guess: the foreign key constraint needs to exist on the child
table; having the key on the parent means nothing for the child table.

- Josh / eggyknap

Вложения

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

Предыдущее
От: Merlin Moncure
Дата:
Сообщение: Re: Selling an 8.1 to 8.3 upgrade
Следующее
От: Kenneth Tilton
Дата:
Сообщение: Re: delete cascade not working