From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | xyzyx <xyzyx(at)rambler(dot)ru> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: wrong timestamp |
Date: | 2006-07-26 17:03:57 |
Message-ID: | 20060726170357.GA55657@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jul 25, 2006 at 05:54:00PM +0400, xyzyx wrote:
> I use Postgresql 8.1.4 on Debian,
> when I run command 'select current timestamp' or 'select now' in
> pgAdmin, I everytime get "2000-01-01 03:02:16.105976+03".
> When I run 'select TIMEOFDAY()' I get right time.
Are you getting the actual value "2000-01-01 03:02:16.105976+03"
or is that just a hypothetical example to show that the value doesn't
change? If the latter then see the comments about current_timestamp
in the documentation:
http://www.postgresql.org/docs/8.1/interactive/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT
"It is important to know that CURRENT_TIMESTAMP and related functions
return the start time of the current transaction; their values do
not change during the transaction. This is considered a feature:
the intent is to allow a single transaction to have a consistent
notion of the 'current' time, so that multiple modifications within
the same transaction bear the same time stamp."
--
Michael Fuhr
From | Date | Subject | |
---|---|---|---|
Next Message | Woody Woodring | 2006-07-26 17:05:28 | Re: Database Restore errors |
Previous Message | Silvela, Jaime (Exchange) | 2006-07-26 16:48:37 | copy losing information |