Re: Precision loss casting float to numeric

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Precision loss casting float to numeric
Дата
Msg-id CA+TgmoZvuXgnDAhEMcRJDGki=2pY9RdzxzW=5UxMTBMkZ_X2Yw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Precision loss casting float to numeric  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Feb 26, 2018 at 1:29 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The bigger question here is whether people actually want this behavioral
> change.  I think there's probably a bigger chance of complaints that
> "casting 1.1::float8 to numeric now produces some weird,
> incorrectly-rounded result" than that we make anyone happier.

Yeah, I worry about that, too.

Of course, as you know, I also have a deep and abiding skepticism
about IEEE binary floats as a concept.  Anomalies are unavoidable; we
can choose exactly which set users experience, but we can eliminate
them because the underlying storage format is poorly-adapted to the
behavior people actually want.  It's too bad that IEEE decimal floats
weren't standardized until 2008.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: prokind column (was Re: [HACKERS] SQL procedures)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: prokind column (was Re: [HACKERS] SQL procedures)