converting PostgreSQ- timestamp to UNIX-timestamp ?

From: "Cornelia Boenigk" <poppcorn(at)cornelia-boenigk(dot)de>
To: <pgsql-general(at)postgresql(dot)org>
Subject: converting PostgreSQ- timestamp to UNIX-timestamp ?
Date: 2003-09-17 17:12:36
Message-ID: 001501c37d3e$f208c050$0201a8c0@zwerg2000
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Shadovitz 2003-09-17 17:32:57 Where are PL/pgSQL functions stored?
Previous Message Network Administrator 2003-09-17 16:53:16 Re: Database Recovery Procedures