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

From Stephan Szabo
Subject Re: Foreign Key Constraint Deletion Order
Date
Msg-id 20011118175857.C40879-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Foreign Key Constraint Deletion Order  (<cnliou@eurosport.com>)
List pgsql-sql
On Mon, 19 Nov 2001 cnliou@eurosport.com wrote:

> I have found from a small number of tests that
> deletions executed by foreign key constraint does NOT
> guarantee the detail table to be deleted BEFORE
> master table. This makes some of my trigger functions
> assocated with the detail table mulfunction because
> the trigger function can't find its parent record.

The detail table rows are currently deleted at
end of statement or end of transaction (based on
deferrability).  Technically the time is indeterminate
in regards to user triggers on the master table.
We've been having discussions on hackers about the behavior,
but it's unlikely that the rows will be deleted before
the master row.



pgsql-sql by date:

Previous
From:
Date:
Subject: Foreign Key Constraint Deletion Order
Next
From: Roland Roberts
Date:
Subject: Re: PL/pgSQL examples NOT involving functions