Re: Time at end of transaction

From: Richard Huxton <dev(at)archonet(dot)com>
To: Phil Endecott <spam_from_postgresql_general(at)chezphil(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Time at end of transaction
Date: 2004-10-13 12:27:04
Message-ID: 416D1F18.2000201@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2004-10-13 13:01:28 Re: Management software for Postgresql
Previous Message Bob Powell 2004-10-13 12:25:36 Management software for Postgresql