Re: Time at end of transaction - Mailing list pgsql-general

From Richard Huxton
Subject Re: Time at end of transaction
Date
Msg-id 416D1F18.2000201@archonet.com
Whole thread Raw
In response to Time at end of transaction  (Phil Endecott <spam_from_postgresql_general@chezphil.org>)
List pgsql-general
Phil Endecott wrote:
> Dear All,
>
> Within a transaction, now() and current_timestamp are constant and give
> the time that the transaction started.  This is normally what you want.
>  But I have a case where I actually need the time that the transaction
> is committed, or something similar.  Is there a way to get it?  Here is
> the problem:

You want timeofday() - see the "date/time functions" section of the
manuals. Note that it returns text not timestamptz.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: "Bob Powell"
Date:
Subject: Management software for Postgresql
Next
From: Richard Huxton
Date:
Subject: Re: Management software for Postgresql