Re: [HACKERS] [BUG] Denormal float values break backup/restore

2011-06-20 Thread Jeroen Vermeulen
On 2011-06-20 19:22, Marti Raudsepp wrote: AIUI that is defined to be a little vague, but includes denormalized numbers that would undergo any rounding at all. It says that on overflow the conversion should return the appropriate HUGE_VAL variant, and set ERANGE. On underflow it returns a rea

Re: [HACKERS] [BUG] Denormal float values break backup/restore

2011-06-20 Thread Marti Raudsepp
Hi, thanks for chiming in. On Sat, Jun 11, 2011 at 22:08, Jeroen Vermeulen wrote: > AIUI that is defined to be a little vague, but includes denormalized numbers > that would undergo any rounding at all.  It says that on overflow the > conversion should return the appropriate HUGE_VAL variant, and

Re: [HACKERS] [BUG] Denormal float values break backup/restore

2011-06-11 Thread Jeroen Vermeulen
On 2011-06-11 01:57, Tom Lane wrote: (5) Lobby your libc providers to make strtod accept denormals without throwing ERANGE. There is no obvious reason why it shouldn't. (On at least one of my boxes, it does.) The standard either explicitly allows or requires this behaviour (depending on whi

Re: [HACKERS] [BUG] Denormal float values break backup/restore

2011-06-10 Thread Tom Lane
Marti Raudsepp writes: > On Fri, Jun 10, 2011 at 17:20, Tom Lane wrote: >> I put this right about on par with the occasional suggestions that we >> implement our own filesystem. > I am worried that legitimate calculations can bring the database into > a state where a backup succeeds, but is no l

Re: [HACKERS] [BUG] Denormal float values break backup/restore

2011-06-10 Thread Marti Raudsepp
On Fri, Jun 10, 2011 at 17:20, Tom Lane wrote: > I put this right about on par with the occasional suggestions that we > implement our own filesystem.  It's not our core competency and in the > end there is no value-add.  If you need to work with denormals, find > a platform that supports them bet

Re: [HACKERS] [BUG] Denormal float values break backup/restore

2011-06-10 Thread Tom Lane
Marti Raudsepp writes: > Looking at utils/adt/float.c, seems that some platforms also have > other problems with the strtod() function. Maybe it's time to > implement our own, without bugs and with proper handling for denormal > float values? I put this right about on par with the occasional sugg

[HACKERS] [BUG] Denormal float values break backup/restore

2011-06-10 Thread Marti Raudsepp
Hi list, I was playing around with denormal float values in response to the Itanium thread and noticed that Postgres' float conversion functions behave inconsistently, at least on Linux with glibc 2.14 It can successfully convert denormal float values to strings: marti=# select '0.25e-307'::float