Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id fAK4D4m17133 for ; Mon, 19 Nov 2001 23:13:04 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id fAK4BVc27658; Mon, 19 Nov 2001 23:11:31 -0500 (EST) To: cnliou@eurosport.com cc: pgsql-sql@postgresql.org Subject: Re: Foreign Key Constraint Deletion Order In-reply-to: <200111200350.0341@lh00.opsion.fr> References: <200111200350.0341@lh00.opsion.fr> Comments: In-reply-to message dated "Tue, 20 Nov 2001 03:50:03 +0000" Date: Mon, 19 Nov 2001 23:11:31 -0500 Message-ID: <27655.1006229491@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200111/281 X-Sequence-Number: 5663 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