NaN/Inf fix for ECPG Re: out-of-scope cursor errors

From: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
To: Michael Meskes <meskes(at)postgresql(dot)org>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: NaN/Inf fix for ECPG Re: out-of-scope cursor errors
Date: 2010-01-29 16:48:56
Message-ID: 4B631178.9070507@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Meskes írta:
> On Fri, Jan 29, 2010 at 06:32:20AM +0100, Boszormenyi Zoltan wrote:
>
>> I know. Patches were already posted for that,
>> waiting for Michael to review and apply it.
>>
>
> Just came back from another trip. Patch works on my system, so I committed it.
>
> Michael
>

Thanks. Hopefully that will make the buildfarm green from this problem.
As you might have noticed, the fix you just committed deleted the test
for NaN in the outofscope.pgc regression test, which I tried to fix
separately.

The buildfarm revealed a problem with NaN/Inf handling, like:
- Windows (and mybe others) don't accept "NaN" in strtod()
- different UNIX(-like) platforms write out different strings in printf()
for a double variable storing. NaN. E.g.: Linux: "nan",
Solaris: "NaN", AIX: "NaNQ"

Can you also review the NaN/Infinity patch, too? This fix uses
the same methods as the backend, i.e. looking for special strings
and attempt to handle them in a portable way. There is one
possible problem regarding NaNs and risnull()/rsetnull():
I had to introduce a new symbol (NUMERIC_NULL) for
handling NULL inline in the numeric value itself.

Best regards,
Zoltán Böszörményi

--
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics

----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-01-29 16:57:02 Re: ordered aggregates using WITHIN GROUP (was Re: can somebody execute this query on Oracle 11.2g and send result?)
Previous Message Simon Riggs 2010-01-29 16:42:03 Re: Hot Standby: Relation-specific deferred conflict resolution