Re: clock_timestamp() and transaction_timestamp() function - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: clock_timestamp() and transaction_timestamp() function
Date
Msg-id 200311301742.hAUHgVX12918@candle.pha.pa.us
Whole thread Raw
In response to Re: clock_timestamp() and transaction_timestamp() function  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: clock_timestamp() and transaction_timestamp() function  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-patches
Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > We have started 7.5 development so we can now work with you to complete
> > this item.  Your question was what does statement_timestamp() show.
> > That has been discussed and it is a little tricky.  The idea is that is
> > should be start of a single statement that arrives from the user or is
> > requestd by a client.  However, this gets muddled because SPI can issue
> > queries and plpgsql functions can too.
>
> Are these supposed to be user-visible functions?  What are they supposed
> to do?

Yes, user-visible.  They give additional current timestamp information.
transaction_timestamp() is the same as current_timestamp,
clock_timestamp is the same as gettimeofday(), and statement_timestamp
is a new one that shows statement start time.

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

pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: clock_timestamp() and transaction_timestamp() function
Next
From: Peter Eisentraut
Date:
Subject: Re: clock_timestamp() and transaction_timestamp() function