Re: [GENERAL] CURRENT_TIMESTAMP

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: John Hasler <john(at)dhh(dot)gt(dot)org>, pgsql-sql(at)postgresql(dot)org
Subject: Re: [GENERAL] CURRENT_TIMESTAMP
Date: 2002-09-24 03:52:55
Message-ID: 200209240352.g8O3qtJ03739@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-sql

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Can I add TODO items for this:
> > o Make CURRENT_TIMESTAMP/now() return statement start time
> > o Add TRANSACTION_TIMESTAMP to return transaction start time
>
> I object to both of those as phrased. If you have already unilaterally
> determined the design of this feature change, then go ahead and put that
> in. But I'd suggest
>
> o Revise current-time functions to allow access to statement
> start time
>
> which doesn't presuppose the vote about how to do it.

OK, I am still just throwing out ideas. I am not sure we even have
enough people who want statement_timestamp to put it in TODO. I do think
we have a standards issue.

My personal opinion is that most people think current_timestamp and
now() are statement start time, not transaction start time. In the past
we have told them the standard requires that but now I think we are not
even sure if that is correct.

So, I have these concerns:

our CURRENT_TIMESTAMP may not be standards compliant
even if it is, it is probably not returning the value most people want
most people don't know it is returning the transaction start time

So, we can just throw the TODO item you mentioned above with a question
mark, or we can try to figure out what to return for CURRENT_TIMESTAMP,
now(), and perhaps create a TRANSACTION_TIMESTAMP.

So, do people want to discuss it or should we just throw it in TODO with
a question mark?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mr. Tomcat 2002-09-24 04:14:32 Design question: Using Array datatypes
Previous Message Tom Lane 2002-09-24 03:44:37 Re: [GENERAL] CURRENT_TIMESTAMP

Browse pgsql-hackers by date

  From Date Subject
Next Message Pete St. Onge 2002-09-24 04:29:36 Re: Hosed PostGreSQL Installation
Previous Message Gavin Sherry 2002-09-24 03:49:46 Web site

Browse pgsql-sql by date

  From Date Subject
Next Message Jeroen Olthof 2002-09-24 07:45:14 database abstraction -> functions
Previous Message Tom Lane 2002-09-24 03:44:37 Re: [GENERAL] CURRENT_TIMESTAMP