Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.10.1/8.10.1) with ESMTP id e7BEAeG91577 for ; Fri, 11 Aug 2000 10:10:40 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id KAA02088; Fri, 11 Aug 2000 10:10:30 -0400 (EDT) To: Mark Volpe cc: pgsql-sql@postgresql.org Subject: Re: Rules aren't doing what I expect In-reply-to: <399180FD.2ACF8B2D@epamail.epa.gov> References: <399180FD.2ACF8B2D@epamail.epa.gov> Comments: In-reply-to Mark Volpe message dated "Wed, 09 Aug 2000 12:04:13 -0400" Date: Fri, 11 Aug 2000 10:10:30 -0400 Message-ID: <2085.966003030@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200008/74 Mark Volpe 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