Skip site navigation (1) Skip section navigation (2)

Re: Incorrect date/time returned by current_timestamp

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Colin Mangiagalli <colin(at)camara(dot)co(dot)za>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Incorrect date/time returned by current_timestamp
Date: 2002-06-04 13:08:14
Message-ID: 1023196094.22175.3541.camel@linda (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Mon, 2002-06-03 at 14:22, Colin Mangiagalli wrote:
> Hi there
> I am using postgresql 7.2.1 with cygwin under W2K. I have noticed that
> when I start postmaster, current_timestamp
> returns the correct time, but as time goes by, the value returned by
> current_timestamp gets further and further
> from the current system time.
> Can someone please tell me why this is and what I can do to fix it.

Within one transaction, CURRENT_TIMESTAMP always returns the same time;
this is by design.  I have never used PostgreSQL under Windows, but I do
not think that there is anything Windows-specific about the behaviour
you are seeing; you must have a transaction open.

Oliver Elphick                                Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight                    
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C

     "But without faith it is impossible to please him; for 
      he that cometh to God must believe that he is, and 
      that he is a rewarder of them that diligently seek 
      him."       Hebrews 11:6 

In response to

pgsql-novice by date

Next:From: Oliver ElphickDate: 2002-06-04 13:18:45
Subject: Re: Question on joining tables
Previous:From: Andrew McMillanDate: 2002-06-03 21:27:38
Subject: Re: Question on joining tables

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group