X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 9F496D1CA3E for ; Wed, 5 Nov 2003 00:11:15 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 11973-02 for ; Tue, 4 Nov 2003 20:10:46 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 7EBF8D1CA59 for ; Tue, 4 Nov 2003 20:10:43 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id hA50Ak19027276; Tue, 4 Nov 2003 19:10:46 -0500 (EST) To: Jamie Lawrence Cc: pgsql-sql@postgresql.org Subject: Re: Problems with NEW.* in triggers In-reply-to: <20031104231402.GB2879@clueinc.net> References: <20031104223319.GA2879@clueinc.net> <26587.1067986114@sss.pgh.pa.us> <20031104231402.GB2879@clueinc.net> Comments: In-reply-to Jamie Lawrence message dated "Tue, 04 Nov 2003 18:14:02 -0500" Date: Tue, 04 Nov 2003 19:10:46 -0500 Message-ID: <27275.1067991046@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/24 X-Sequence-Number: 15839 Jamie Lawrence writes: > I don't understand why moddate isn't getting set to now() in the above. Josh fingered the problem there --- you need a BEFORE trigger if you want to affect the data that will be stored. I had missed that little mistake :-( regards, tom lane