Re: BUG #4972: RFE: convert timestamps to fractional seconds - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4972: RFE: convert timestamps to fractional seconds
Date
Msg-id 17487.1249885208@sss.pgh.pa.us
Whole thread Raw
In response to BUG #4972: RFE: convert timestamps to fractional seconds  ("Richard Neill" <rn214@cam.ac.uk>)
Responses Re: BUG #4972: RFE: convert timestamps to fractional seconds  (Richard Neill <rn214@cam.ac.uk>)
List pgsql-bugs
"Richard Neill" <rn214@cam.ac.uk> writes:
> * Convert a timestamp into a number of seconds since
> the epoch. This can be done in an ugly way using EXTRACT epoch FROM
> timestamp, but only to  integer precision.

Uh, nonsense.

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

It might've been like that back around 7.1, but not in any currently
supported version.

> * Division of a timestamp by an interval should result in something
> dimensionless.

This isn't a particularly sane thing to think about, because intervals
aren't single numbers.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: BUG #4961: pg_standby.exe crashes with no args
Next
From: Jan-Ivar Mellingen
Date:
Subject: Re: Huge speed penalty using <>TRUE instead of =FALSE