Re: Foreign Key Constraint Deletion Order - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: Foreign Key Constraint Deletion Order
Date
Msg-id 20011120000343.G53451-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Foreign Key Constraint Deletion Order  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to use COPY in a function ?
Next
From: Stephan Szabo
Date:
Subject: Re: SELECT * FROM t where p or q;