Re: Rules aren't doing what I expect

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Volpe <volpe(dot)mark(at)epamail(dot)epa(dot)gov>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Rules aren't doing what I expect
Date: 2000-08-11 14:10:30
Message-ID: 2085.966003030@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Mark Volpe <volpe(dot)mark(at)epamail(dot)epa(dot)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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-08-11 15:53:55 Re: Problem with SQL query (eats swap)
Previous Message Mailing List Expander 2000-08-11 02:46:21 Problem with SQL query (eats swap)