Re: [GENERAL] CURRENT_TIMESTAMP
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "Josh Berkus" <josh@agliodbs.com>
Cc: Manfred Koizar <mkoi-pg@aon.at>, Bruce Momjian <pgman@candle.pha.pa.us>, Aaron Held <aaron@MetroNY.com>, Roberto Mello <rmello@cc.usu.edu>, Neil Conway <neilc@samurai.com>, pgsql-sql@postgresql.org
Date: 2002-09-24T16:00:13Z
Lists: pgsql-hackers, pgsql-general, pgsql-sql
"Josh Berkus" <josh@agliodbs.com> writes:
> So, if I've got this straight:
> [ snip ]
> ... thus changing only current_timestamp.
Yeah, that's more or less what I was thinking. The argument for
changing current_timestamp seems to be really just spec compliance;
that doesn't apply to now() or timeofday().
> Better yet, how about we introduce a parameter to now()? Example:
> now() or now('transaction') returns the transaction timestamp.
> now('statement') returns the statement timestamp
> now('immediate') returns the timestamp at the exact time the function
> is called.
I like this.
> We could introduce the new version of now() in 7.4, encourage everyone
> to use it instead of other timestamp calls, and then in 7.5 change the
> behavior of current_timestamp for SQL92 compliance.
I'd be inclined to just do it; we have not been very good about
following through on multi-version sequences of changes. And the
folks who want a standard-compliant current_timestamp aren't going
to want to migrate to now('statement') instead ...
regards, tom lane