Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

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

In response to


pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group