Received: from mx99.openu.ac.il (arbel.openu.ac.il [147.233.32.4]) by hub.org (8.9.3/8.9.3) with ESMTP id GAA54806 for ; Tue, 3 Aug 1999 06:31:22 -0400 (EDT) (envelope-from herouth@oumail.openu.ac.il) Received: from talmon.openu.ac.il (talmon.openu.ac.il [147.233.32.11]) by mx99.openu.ac.il (Postfix) with ESMTP for id 43B464B68A; Tue, 3 Aug 1999 13:31:21 +0300 (IDT) Received: from [147.233.159.109] (mac-herouth.pc.openu.ac.il) by talmon.openu.ac.il (Netscape Messaging Server 3.54) with ESMTP id AAA49AD; Tue, 3 Aug 1999 13:34:46 +0300 X-Sender: herouth@shaked.cc.openu.ac.il Message-Id: In-Reply-To: <37A607FA.E9727ABD@local2me.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 3 Aug 1999 13:32:14 +0300 To: Michael Olivier , "pgsql-sql@postgreSQL.org" From: Herouth Maoz Subject: Re: [SQL] few questions about rules: timestamp, new.oid At 00:04 +0300 on 03/08/1999, Michael Olivier wrote: > 1. I'm storing a datetime timestamp for when the change was entered into > my changes table, but the timestamp doesn't change with subsequent > tests: > > create rule users_modify_rule as on update to users do > insert into changes (table_name, change_time, ref_oid, type) > values ('users', 'now', current.oid, 'update'); Better use a function than a constant - try now() instead. A constant usually gets interpreted at the time of creation. A function remains to be interpreted at the time of use. Herouth -- Herouth Maoz, Internet developer. Open University of Israel - Telem project http://telem.openu.ac.il/~herutma