From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6123: DELETE fails if before trigger causes another trigger to UPDATE
Date: Tue, 19 Jul 2011 17:30:47 -0400
Message-ID: <5769.1311111047@sss.pgh.pa.us> (raw)
In-Reply-To: <201107191831.p6JIVdxu055846@wwwmaster.postgresql.org>
References: <201107191831.p6JIVdxu055846@wwwmaster.postgresql.org>
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> [ circular trigger relationships ]
> I expect the DELETE from a to delete related b record(s) and then succeed.
> Instead the UPDATE in b_del_trig causes delete of a to silently fail.
The update causes the already-selected target row version of the DELETE
to be obsoleted, so heap_delete finds it has nothing to do. I'm
disinclined to mess with that logic.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, Kevin.Grittner@wicourts.gov
Subject: Re: BUG #6123: DELETE fails if before trigger causes another trigger to UPDATE
In-Reply-To: <5769.1311111047@sss.pgh.pa.us>
References: <201107191831.p6JIVdxu055846@wwwmaster.postgresql.org> <5769.1311111047@sss.pgh.pa.us>
* 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