Re: BUG #4972: RFE: convert timestamps to fractional seconds

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Richard Neill" <rn214(at)cam(dot)ac(dot)uk>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4972: RFE: convert timestamps to fractional seconds
Date: 2009-08-10 06:20:08
Message-ID: 17487.1249885208@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Richard Neill" <rn214(at)cam(dot)ac(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message utsav 2009-08-10 06:57:29 ERROR: XLogFlush: request AF/5703EDC8 is not satisfied --- flushed only to AF/50F15ABC
Previous Message Bruce Momjian 2009-08-10 02:20:58 Re: BUG #4961: pg_standby.exe crashes with no args