Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost whenextracting epoch - Mailing list pgsql-hackers

On 2019-12-02 23:52, Thomas Munro wrote:
>> I'm not an expert in floating point math but hopefully it means that no
>> type change is required - double precision can handle it.
> Me neither, but the SQL standard requires us to use an exact numeric
> type, so it's wrong on that level by definition.

I looked into this (changing the return types of date_part()/extract() 
from float8 to numeric).

One problem (other than perhaps performance, tbd.) is that this would no 
longer allow processing infinite timestamps, since numeric does not 
support infinity.  It could be argued that running extract() on infinite 
timestamps isn't very useful, but it's something to consider explicitly.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()
Next
From: Victor Yegorov
Date:
Subject: Re: Failure to create GiST on ltree column