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

Re: 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: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: NaN/Inf fix for ECPG Re: out-of-scope cursor errors
Date: 2010-02-02 14:34:24
Message-ID: 4B6837F0.3040608@cybertec.at (view raw or flat)
Thread:
Lists: pgsql-hackers
Michael Meskes írta:
> On Sat, Jan 30, 2010 at 11:09:34AM +0100, Boszormenyi Zoltan wrote:
>   
>> After I sent it and reread my mail, I realized that my fix
>> wouldn't be enough because of the above: ECPG uses sprintf()
>> for float and double, and just like in the backend, a common
>> code to send "NaN" and +/- "Infinity" to the server is needed.
>> New patch is attached.
>>     
>
> Does it work for you? I get regression test failures. Haven't looked into the
> function yet though.
>   

Arggg. I didn't update the regression test's stderr.
Actually, I didn't do "make install" before running "make check"
and the target directory had the libraries with my previous changeset.
The diff you quoted reflects the last change. Result of
    double d; /* contains NaN or +/- INF */
    printf("%lf", d);
is platform-dependent, the new string is
"fixed" across all platforms.

Here's the new patch with the updated regression test.

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/


Attachment: pg85-ecpg-fix-nan-inf-5-ctxdiff.patch
Description: text/x-patch (43.9 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2010-02-02 14:50:53
Subject: Re: [BUG?] strange behavior in ALTER TABLE ... RENAME TO on inherited columns
Previous:From: Michael MeskesDate: 2010-02-02 14:15:22
Subject: Re: NaN/Inf fix for ECPG Re: out-of-scope cursor errors

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