Re: Foreign Key Constraint Deletion Order

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: cnliou(at)eurosport(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Foreign Key Constraint Deletion Order
Date: 2001-11-20 04:11:31
Message-ID: 27655.1006229491@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

<cnliou(at)eurosport(dot)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.

We've had some discussions in the past about arranging things
so that trigger firing order could be predicted/controlled.
But nothing's been done about it yet. Search the archives
if you want to see the prior discussions.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Christopher Kings-Lynne 2001-11-20 04:32:44 Re: [SQL] PL/pgSQL examples NOT involving functions
Previous Message cnliou 2001-11-20 03:50:03 Re: Foreign Key Constraint Deletion Order