pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Martijn van Oosterhout <kleptog@svana.org>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Manfred Koizar <mkoi-pg@aon.at>
Cc: Roland Roberts <roland@astrofoto.org>
Cc: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [SQL] CURRENT_TIMESTAMP
Date: Sun, 29 Sep 2002 00:35:53 -0400
Message-ID: <8140.1033274153@sss.pgh.pa.us> (raw)
In-Reply-To: <20020929041007.GB6199@svana.org>
References: <20020929034706.GA6199@svana.org>
	<200209290351.g8T3pW920188@candle.pha.pa.us>
	<20020929041007.GB6199@svana.org>

Martijn van Oosterhout <kleptog@svana.org> writes:
> On Sat, Sep 28, 2002 at 11:51:32PM -0400, Bruce Momjian wrote:
>> Yes, it will split now() and CURRENT_TIMESTAMP.  I personally would be
>> happy with STATEMENT_TIMESTAMP, but because the standard requires it we
>> may just have to fix CURRENT_TIMESTAMP.

> Well, my vote would be for STATEMENT_TIMESTAMP.

One problem with inventing STATEMENT_TIMESTAMP is that (if spelled that
way, without parens) it would have to become a fully-reserved keyword,
thus possibly breaking some applications that use that name now.

But the real point, I think, is that the folks pushing for this think
that the standard requires CURRENT_TIMESTAMP to be statement timestamp.
Inventing some other keyword isn't going to satisfy them.

I don't personally find the "it's required by the spec" argument
compelling, because the spec specifically says that the exact behavior
is implementation-dependent --- so anyone who assumes CURRENT_TIMESTAMP
will behave as start-of-statement timestamp is going to have portability
problems anyway.  Oracle didn't seem to find the argument compelling
either; at last report they have no statement-timestamp function.

I'd be happier with the whole thing if anyone had exhibited a convincing
use-case for statement timestamp.  So far I've not seen any actual
examples of situations that are not better served by either transaction
timestamp or true current time.  And the spec is perfectly clear that
CURRENT_TIMESTAMP does not mean true current time...

			regards, tom lane



view thread (61+ messages)  latest in thread

Message-ID: <8140.1033274153@sss.pgh.pa.us>
Permalink:  ../8140.1033274153@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8140.1033274153@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kleptog@svana.org, pgman@candle.pha.pa.us, mkoi-pg@aon.at, roland@astrofoto.org, pgsql-general@postgresql.org
  Subject: Re: [SQL] CURRENT_TIMESTAMP
  In-Reply-To: <8140.1033274153@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox