Re: current_timestamp wrong

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Peter Pilsl <pilsl(at)goldfisch(dot)at>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: current_timestamp wrong
Date: 2001-08-22 22:06:23
Message-ID: Pine.BSF.4.21.0108221500590.13463-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 22 Aug 2001, Peter Pilsl wrote:

> The problem occures when using the DBI-module for perl and mod_perl in
> apache and the db-handle is stored globally for hours. On the first
> call for current_timestamp after long idle-time the returned value is
> *sometimes* incorrect.

Are you inside a transaction?

<para>
It is quite important to realize that
<function>CURRENT_TIMESTAMP</function> and related functions all return
the time as of the start of the current transaction; their values do not
increment while a transaction is running. But
<function>timeofday()</function> returns the actual current time.
</para>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-08-22 22:12:33 Re: Error reporting when hitting shared memory limits -
Previous Message Murray Hobbs 2001-08-22 22:01:07 protected ON DELETE CASCADE