pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: Foreign Key Constraint Deletion Order
Date: Tue, 20 Nov 2001 00:07:56 -0800 (PST)
Message-ID: <20011120000343.G53451-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <27655.1006229491@sss.pgh.pa.us>

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.





view thread (8+ messages)  latest in thread

Message-ID: <20011120000343.G53451-100000@megazone23.bigpanda.com>
Permalink:  ../20011120000343.G53451-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20011120000343.G53451-100000@megazone23.bigpanda.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, tgl@sss.pgh.pa.us
  Subject: Re: Foreign Key Constraint Deletion Order
  In-Reply-To: <20011120000343.G53451-100000@megazone23.bigpanda.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox