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: josh(at)agliodbs(dot)com, Manfred Koizar <mkoi-pg(at)aon(dot)at>, Aaron Held <aaron(at)MetroNY(dot)com>, Roberto Mello <rmello(at)cc(dot)usu(dot)edu>, Neil Conway <neilc(at)samurai(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: [GENERAL] CURRENT_TIMESTAMP
Date: 2002-09-24 00:37:58
Message-ID: 200209240037.g8O0bwM14523@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:
> > I see what you are saying now --- that even single user statements can
> > trigger multiple statements, so you would have to say transaction start
> > time is time the user query starts. I can see how that seems a little
> > arbitrary. However, don't we have separate paths for user queries and
> > queries sent as part of a rule?
>
> We could use "time of arrival of the latest client command string",
> if we wanted to do something like this. My point is that that very
> arbitrarily assumes that those are the significant points within a
> transaction, and that the client has no need to send multiple commands
> that want to insert the same timestamp into different tables. This is
> an unwarranted assumption about the client's control structure, IMHO.
>
> A possible compromise is to dissociate now() and current_timestamp,
> allowing the former to be start of transaction and the latter to be
> start of client command.

I was thinking 'transaction_timestamp' for the transaction start time, and
current_timestamp for the statement start time. I would equate now()
with current_timestamp.

--
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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mr. Tomcat 2002-09-24 01:07:15 State of Replication?
Previous Message Tom Lane 2002-09-24 00:32:52 Re: [GENERAL] CURRENT_TIMESTAMP

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-09-24 00:38:14 Re: BETA2 HOLD: was Re: NUMERIC's transcendental functions
Previous Message Jan Wieck 2002-09-24 00:34:30 Re: BETA2 HOLD: was Re: NUMERIC's transcendental functions

Browse pgsql-sql by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-09-24 01:19:12 Re: [SQL] CURRENT_TIMESTAMP
Previous Message Tom Lane 2002-09-24 00:32:52 Re: [GENERAL] CURRENT_TIMESTAMP