How to typecast an integer into a timestamp?

Поиск
Список
Период
Сортировка
От bboett@free.fr
Тема How to typecast an integer into a timestamp?
Дата
Msg-id f85aba0c-992e-4c4e-bf45-772fe03b3288@zimbra3-e1.priv.proxad.net
обсуждение исходный текст
Ответы Re: How to typecast an integer into a timestamp?  (Adrian Klaver <adrian.klaver@gmail.com>)
Re: How to typecast an integer into a timestamp?  (Andy Colson <andy@squeakycode.net>)
Re: How to typecast an integer into a timestamp?  (Adrian Klaver <adrian.klaver@gmail.com>)
Список pgsql-general
Hello!

again quite a stupid problem i regularly run into....
and that i still haven't solved yet...

again i used a type timestamp to keep a track of modification time, and again it gets stupid and confusing.....

first of all the errors are labeled as timestamp without timezone, i only specified timestamp....

the data was created as a timestamp with php-mktime, but when sending to the database postgres complains that its an
int,and when i try to typecast it, (with the ::timestamp appendix to the value), that its not possible to convert an
intto a timestamp (without timezone) ..... 

so as usual i would discard the timezone datatype and alter the table to use integer instead, but this time i am
wondering,since this datatype is present, there's surely a way to use it properly? but how? 

please enlighten me!

ciao
Bruno

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

Предыдущее
От: Daniel Vázquez
Дата:
Сообщение: Full Text Search, avoiding lexemes search
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: How to typecast an integer into a timestamp?