Re: problem with unixtime conversion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: problem with unixtime conversion
Дата
Msg-id 17382.1042568343@sss.pgh.pa.us
обсуждение исходный текст
Ответ на problem with unixtime conversion  ("Nathan Suderman" <nathan@pollstar.com>)
Список pgsql-general
"Nathan Suderman" <nathan@pollstar.com> writes:
> test=> select date(date_part('epoch','now'::date)::int);
> ERROR:  Bad date external representation '1042502400'

I think your code was relying on the int->abstime coercion, which was
implicitly invokable before 7.3, but now has to be specified explicitly.

regression=# select date(date_part('epoch','now'::date)::int::abstime);
    date
------------
 2003-01-13
(1 row)


            regards, tom lane

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Server error and deadlocks
Следующее
От: Ben
Дата:
Сообщение: Re: problem with unixtime conversion