From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Volpe <volpe.mark@epamail.epa.gov>
Cc: pgsql-sql@postgresql.org
Subject: Re: Rules aren't doing what I expect
Date: Fri, 11 Aug 2000 10:10:30 -0400
Message-ID: <2085.966003030@sss.pgh.pa.us> (raw)
In-Reply-To: <399180FD.2ACF8B2D@epamail.epa.gov>
References: <399180FD.2ACF8B2D@epamail.epa.gov>
Mark Volpe <volpe.mark@epamail.epa.gov> writes:
> When I try this out, however, the rule seems to use the original
> value, rather than the "corrected" value.
Queries added by non-INSTEAD rules are always performed before the
initially-given query, so you're right, the rule will see the unmodified
value.
I'd suggest folding the log-entry-making into your trigger, actually.
If you have a trigger anyway then the insert into t1_log is only one
more line in that trigger procedure...
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-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, volpe.mark@epamail.epa.gov
Subject: Re: Rules aren't doing what I expect
In-Reply-To: <2085.966003030@sss.pgh.pa.us>
References: <399180FD.2ACF8B2D@epamail.epa.gov> <2085.966003030@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