converting PostgreSQ- timestamp to UNIX-timestamp ?

Поиск
Список
Период
Сортировка
От Cornelia Boenigk
Тема converting PostgreSQ- timestamp to UNIX-timestamp ?
Дата
Msg-id 001501c37d3e$f208c050$0201a8c0@zwerg2000
обсуждение исходный текст
Ответ на psql and blob  (Daniel Schuchardt <daniel_schuchardt@web.de>)
Ответы Re: converting PostgreSQ- timestamp to UNIX-timestamp ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi everybody

To convert PostgreSQL timestmp to UNIX timestamp I use

select ((today::abstime)::int4) from table ...

In the documentation there is a notice that abstime shouldn't be used.
Is there another way to convert?

Also I tried

select timetz_hash(today) from table ..

and got negative values for some timestamps. Does anybody know why?

RedHat 7.3, PostgreSQL 7.2.1


Regards
Conni


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

Предыдущее
От: Network Administrator
Дата:
Сообщение: Re: Database Recovery Procedures
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Database Recovery Procedures