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

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost whenextracting epoch
Дата
Msg-id ee683994-8f7c-aded-be43-543e66e68b94@2ndquadrant.com
обсуждение исходный текст
Ответы Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost whenextracting epoch  (Vik Fearing <vik@postgresfriends.org>)
Re: Since '2001-09-09 01:46:40'::timestamp microseconds are lost when extracting epoch  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: repeat() function, CHECK_FOR_INTERRUPTS(), and unlikely()
Следующее
От: Victor Yegorov
Дата:
Сообщение: Re: Failure to create GiST on ltree column