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