Re: Unix timestamp , unix timestamp with microseconds

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Richard Huxton <dev(at)archonet(dot)com>
Cc: "In(dot) Martin Prášek" <prasek(at)silesia(dot)cz>, pgsql-general(at)postgresql(dot)org
Subject: Re: Unix timestamp , unix timestamp with microseconds
Date: 2004-05-21 15:33:58
Message-ID: 4102.1085153638@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richard Huxton <dev(at)archonet(dot)com> writes:
> In. Martin Prek wrote:
>> I I read the documentation well (PG 7.3.3 ) , i see that there is not a native support for data type UNIX TIMESTAMP and "unix timestamp expressed as microseconds"
>>
>> ie there it is impossible to direct insert and select
>>
>> seconds_from _Epoch
>> seconds_from _Epoch (period) microseconds_part
>> seconds_from _Epochmicroseconds_part
>>
>> without some data conversion ?

> You could use a numeric type if that's what you want -

I'd stick with the basic float representation of timestamps. We don't
have the particular syntaxes suggested above, but the functionality is
all there, eg

regression=# select extract(epoch from now());
date_part
------------------
1085153447.89091
(1 row)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-05-21 15:41:21 Re: feature idea – automatic up
Previous Message Richard Huxton 2004-05-21 15:26:39 Re: Automatically fudging query results?