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 C26A4D1C9FE for ; Wed, 5 Nov 2003 00:17:22 +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 10494-10 for ; Tue, 4 Nov 2003 20:16:53 -0400 (AST) Received: from frankenbride.clueinc.net (xd84b4366.ip.e-nt.net [216.75.67.102]) by svr1.postgresql.org (Postfix) with ESMTP id ED782D1CA55 for ; Tue, 4 Nov 2003 20:16:50 -0400 (AST) Received: by frankenbride.clueinc.net (Postfix, from userid 16220) id 0BBDEBA34; Tue, 4 Nov 2003 19:16:53 -0500 (EST) Date: Tue, 4 Nov 2003 19:16:53 -0500 From: Jamie Lawrence To: Tom Lane Cc: pgsql-sql@postgresql.org Subject: Re: Problems with NEW.* in triggers Message-ID: <20031105001653.GD2879@clueinc.net> Mail-Followup-To: Tom Lane , pgsql-sql@postgresql.org References: <20031104223319.GA2879@clueinc.net> <26587.1067986114@sss.pgh.pa.us> <20031104231402.GB2879@clueinc.net> <27275.1067991046@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <27275.1067991046@sss.pgh.pa.us> User-Agent: Mutt/1.3.28i Organization: clue inc X-URL: http://www.clueinc.net/ X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/52 X-Sequence-Number: 15867 On Tue, 04 Nov 2003, Tom Lane wrote: > 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 :-( Yep. Many thanks to both of you. -j -- Jamie Lawrence jal@jal.org If built in great numbers, motels will be used for nothing but illegal purposes. - J. Edgar Hoover