From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Chapman Flack <chap(at)anastigmatix(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Precision loss casting float to numeric |
Date: | 2018-02-26 18:55:25 |
Message-ID: | CA+TgmoZvuXgnDAhEMcRJDGki=2pY9RdzxzW=5UxMTBMkZ_X2Yw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Feb 26, 2018 at 1:29 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-02-26 19:03:19 | Re: prokind column (was Re: [HACKERS] SQL procedures) |
Previous Message | Peter Eisentraut | 2018-02-26 18:51:59 | Re: prokind column (was Re: [HACKERS] SQL procedures) |