X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 52046D1C955 for ; Wed, 30 Jul 2003 13:49:06 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 58718-08 for ; Wed, 30 Jul 2003 10:48:08 -0300 (ADT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 4F15AD1C975 for ; Wed, 30 Jul 2003 10:49:04 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.9/8.12.9) with ESMTP id h6UDmsQ3009175; Wed, 30 Jul 2003 09:48:55 -0400 (EDT) To: Bruce Momjian Cc: Denis Zaitsev , pgsql-sql@postgresql.org Subject: Re: Very strange 'now' behaviour in nested triggers. In-reply-to: <200307300220.h6U2KGR12803@candle.pha.pa.us> References: <200307300220.h6U2KGR12803@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Tue, 29 Jul 2003 22:20:16 -0400" Date: Wed, 30 Jul 2003 09:48:54 -0400 Message-ID: <9174.1059572934@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/454 X-Sequence-Number: 14568 Bruce Momjian writes: > Strangely, CURRENT_TIMESTAMP converts to 'now', not now(). Is that a > problem? No, it is not, because the text-to-timestamptz conversion is marked volatile and won't be const-folded. I've always thought it was a very ugly implementation though, mainly because it doesn't reverse-list nicely in rule dumps. Sometime we should try to fix it so that it reverse-lists as "current_timestamp(n)", and likewise for the similar special cases in gram.y. regards, tom lane