Re: NaN/Inf fix for ECPG

From: Boszormenyi Zoltan <zb(at)cybertec(dot)at>
To: Rémi Zara <remi_zara(at)mac(dot)com>
Cc: Michael Meskes <meskes(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: NaN/Inf fix for ECPG
Date: 2010-02-25 12:26:34
Message-ID: 4B866C7A.20403@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> As Rémi says, isnan((double)(0.0 / 0.0)) == true for him.
> Michael: IIRC, IEEE754 explicit about that the (0.0/0.0) division
> produces NaN. How about doing it explicitely in ECPG?
>

I came up with three patches, they are attached.

Can you try whether the first patch (missing float.h from data.c)
solves the problem? And together with the 2nd one? In that
patch I fixed the order of float.h and math.h in nan_test.pgc,
which is the opposite of the order found in e.g. backend/utils/adt/float.c.

The 3rd patch is explicit about NetBSD/mips but it doesn't feel right.

They are working on Linux/x86-64 and NetBSD/x86-64. Can you try
the combinations below on "pika" outside the buildfarm whether they
still fail the ECPG make check?
- patch 1 by itself (12a)
- patch 1+2 (12a + 12-regr)
- patch 3 with/without 1+2

Sorry to give you work, but we don't have a mips machine.

Thanks in advance,
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 Content-Type Size
pg85-ecpg-fix-nan-inf-12a-ctxdiff.patch text/x-patch 322 bytes
pg85-ecpg-fix-nan-inf-12-regr-ctxdiff.patch text/x-patch 1.3 KB
pg85-ecpg-fix-nan-inf-12-ctxdiff.patch text/x-patch 540 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2010-02-25 13:27:21 Re: Recent vendor SSL renegotiation patches break PostgreSQL
Previous Message Heikki Linnakangas 2010-02-25 12:18:27 Re: A thought on Index Organized Tables