Re: wrong timestamp

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: wrong timestamp
Дата
Msg-id 20060726170357.GA55657@winnie.fuhr.org
обсуждение исходный текст
Ответ на wrong timestamp  (xyzyx <xyzyx@rambler.ru>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Reece Hart
Дата:
Сообщение: Re: Mapping/DB Migration tool
Следующее
От: "Woody Woodring"
Дата:
Сообщение: Re: Database Restore errors