From: Wiebe Cazemier <halfgaar@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: Delete rule chain stops unexpectedly
Date: Fri, 21 Oct 2005 17:01:48 +0200
Message-ID: <435902DC.3000807@gmail.com> (raw)
In-Reply-To: <21436.1129905772@sss.pgh.pa.us>
References: <4358F79B.1000409@gmail.com>
<21436.1129905772@sss.pgh.pa.us>
Tom Lane wrote:
> The rule that actually deletes the rows from the underlying has to fire
> last, since the rows are gone from the view (and hence from OLD) the
> moment you delete them.
A quote from the postgresql manual:
"But for ON UPDATE and ON DELETE rules, the original query is done after the
actions added by rules. This ensures that the actions can see the to-be-updated
or to-be-deleted rows"
So, the actual delete should be done after all the rules. And even if it does
delete before anything else, that does not explain why "step2" is not inserted
into the debuglog table. Or, that all the rules _are_ executed when I call the
query with "explain analayze".
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: halfgaar@gmail.com, tgl@sss.pgh.pa.us
Subject: Re: Delete rule chain stops unexpectedly
In-Reply-To: <435902DC.3000807@gmail.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