Re: Rule updates and PQcmdstatus() issue - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Rule updates and PQcmdstatus() issue
Date
Msg-id 18885.1031664266@sss.pgh.pa.us
Whole thread Raw
In response to Re: Rule updates and PQcmdstatus() issue  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: Rule updates and PQcmdstatus() issue
List pgsql-hackers
Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> On Mon, 9 Sep 2002, Bruce Momjian wrote:
>> All the problems here are coming from INSTEAD rules.  We don't have
>> INSTEAD triggers or contraints.

> Sure we do, well sort of. :)
> Make a before trigger that does a different statement and returns NULL
> to abort the original action on that row.

I think we can reasonably leave the side-effects of triggers out of the
discussion.  PQcmdStatus numbers have never included side-effects of
triggers in the past, and I see no reason for them to start now.

I think it's reasonable to exclude both triggers and non-INSTEAD rules
from the status count, on the grounds that these normally represent
"add-on" actions and not the "real" action.  The cases that get
interesting are those that involve multiple INSTEAD actions (either from
multiple INSTEAD rules, or a single rule with multiple commands in its
body) and those cases where the INSTEAD action is a different type from
the original command (eg, ON UPDATE DO INSTEAD INSERT...).
        regards, tom lane


pgsql-hackers by date:

Previous
From: snpe
Date:
Subject: Re: problem with new autocommit config parameter and jdbc
Next
From: Tom Lane
Date:
Subject: Re: problem with new autocommit config parameter and jdbc