converting PostgreSQ- timestamp to UNIX-timestamp ? - Mailing list pgsql-general

From Cornelia Boenigk
Subject converting PostgreSQ- timestamp to UNIX-timestamp ?
Date
Msg-id 001501c37d3e$f208c050$0201a8c0@zwerg2000
Whole thread Raw
In response to psql and blob  (Daniel Schuchardt <daniel_schuchardt@web.de>)
Responses Re: converting PostgreSQ- timestamp to UNIX-timestamp ?
List 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 by date:

Previous
From: Network Administrator
Date:
Subject: Re: Database Recovery Procedures
Next
From: Tom Lane
Date:
Subject: Re: Database Recovery Procedures