Re: Convert "epoch" to timestamp

Поиск
Список
Период
Сортировка
От Thomas Lockhart
Тема Re: Convert "epoch" to timestamp
Дата
Msg-id 3CC577F4.BFC60907@fourpalms.org
обсуждение исходный текст
Ответ на Convert "epoch" to timestamp  (Jeff Eckermann <jeff_eckermann@yahoo.com>)
Список pgsql-general
...
> Can I rely on this continuing to work?  Apparently
> not, because the docs say (wrt "abstime" and
> "reltime"): "Any or all of these internal types might
> disappear in a future release."

Right. But it won't disappear from the version you are running ;)

The following also works:

lockhart=# select timestamp without time zone 'today',
lockhart=> timestamp without time zone '1970-01-01'
lockhart=> + cast('1019520000' as interval);
      timestamp      |      ?column?
---------------------+---------------------
 2002-04-23 00:00:00 | 2002-04-23 00:00:00

I'm not sure what other features for integer->timestamp conversions may
be available in the future, but the above conforms to SQL9x standards so
is likely to be a good choice...

                     - Thomas

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

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: Convert "epoch" to timestamp
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Convert "epoch" to timestamp