Re: current_timestamp wrong - Mailing list pgsql-general

From Stephan Szabo
Subject Re: current_timestamp wrong
Date
Msg-id Pine.BSF.4.21.0108221500590.13463-100000@megazone23.bigpanda.com
Whole thread Raw
In response to current_timestamp wrong  (Peter Pilsl <pilsl@goldfisch.at>)
List 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>





pgsql-general by date:

Previous
From: Murray Hobbs
Date:
Subject: protected ON DELETE CASCADE
Next
From: Tom Lane
Date:
Subject: Re: current_timestamp wrong