Re: Foreign Key Constraint Deletion Order

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Foreign Key Constraint Deletion Order
Дата
Msg-id 20011120000343.G53451-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: Foreign Key Constraint Deletion Order  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
On Mon, 19 Nov 2001, Tom Lane wrote:

> <cnliou@eurosport.com> writes:
> > Am I asking for too much, or RI and triggers were not
> > designed for operations like this example in the
> > first place?
>
> The problem is that RI is implemented by triggers, and there's
> no guarantees about the firing order of multiple triggers.
> So you don't know whether your custom triggers will fire
> before or after the RI actions occur.

Even specifying the after trigger order wouldn't help him
I think. He'd want the deletion of the details rows and their
associated triggers to run before the actual deletion of the
master row. I'd guess that would require the cascade delete
to be being done as a before delete trigger.




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to use COPY in a function ?
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: SELECT * FROM t where p or q;