Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 5BD5E476689 for ; Tue, 24 Sep 2002 09:26:39 -0400 (EDT) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id C319847668E for ; Tue, 24 Sep 2002 09:26:38 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.5/8.12.5) with ESMTP id g8ODQQ5D012394; Tue, 24 Sep 2002 09:26:26 -0400 (EDT) To: Manfred Koizar Cc: josh@agliodbs.com, Bruce Momjian , Aaron Held , Roberto Mello , Neil Conway , pgsql-sql@postgresql.org Subject: Re: [GENERAL] CURRENT_TIMESTAMP In-reply-to: <9ka0puk83umng8f1va1pjiti5gpksdto3j@4ax.com> References: <21724.1032793386@sss.pgh.pa.us> <22827.1032800742@sss.pgh.pa.us> <200209231336.59105.josh@agliodbs.com> <9ka0puk83umng8f1va1pjiti5gpksdto3j@4ax.com> Comments: In-reply-to Manfred Koizar message dated "Tue, 24 Sep 2002 11:16:20 +0200" Date: Tue, 24 Sep 2002 09:26:25 -0400 Message-ID: <12393.1032873985@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/299 X-Sequence-Number: 9576 Manfred Koizar writes: > On Mon, 23 Sep 2002 13:36:59 -0700, Josh Berkus > wrote: >> Ideally, since we get this question a lot, that a compile-time or >> execution-time switch to change the behavior of current_timestamp >> contextually would be nice. > Yes, GUC! I think a GUC variable is overkill, in fact potentially dangerous (what if it's been changed without your app noticing)? I'm fine with changing current_timestamp to be start-of-current-interactive-command, though I'd not want to try to chop it more finely than that, for the reasons already discussed. But I strongly feel that we should leave the historical behavior of now() alone. There is no spec-based argument for changing now(), since it isn't in the spec, and its behavior has been set *and documented* in Postgres since Berkeley days. If we leave now() alone then there's no need to create another non-spec-compliant syntax like 'transaction_timestamp', either. (I really don't want to see us do that, because without parens it would mean making a new, not-in-the-spec fully-reserved word.) BTW, as long as we are dorking with the current-time family, does anyone want to vote for changing timeofday() to return a timestamptz instead of a text string? There's no good argument except slavish backward compatibility for having it return text, and we seem to be quite willing to ignore backwards compatibility in this thread ... regards, tom lane