Re: Floating point comparison inconsistencies of the geometric types

From: Kevin Grittner <kgrittn(at)gmail(dot)com>
To: emre(at)hasegeli(dot)com
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andreas Karlsson <andreas(at)proxel(dot)se>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Robert Haas <robertmhaas(at)gmail(dot)com>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Joe Conway <mail(at)joeconway(dot)com>
Subject: Re: Floating point comparison inconsistencies of the geometric types
Date: 2016-09-02 20:16:45
Message-ID: CACjxUsO0Rt1VeN37rywO55ig_hN+yLyV659hfj6ZBD0BeJjk9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 18, 2016 at 3:54 PM, Emre Hasegeli <emre(at)hasegeli(dot)com> wrote:
> My progress so far is attached as 2 patches. First one introduces an
> header file for adt/float.c. Second one refactors the geometric
> operations.

The first patch fails to apply due to bit-rot. That's easy enough
to correct, but then it runs into warnings on make:

btree_gin.c: In function ‘leftmostvalue_float4’:
btree_gin.c:234:2: error: implicit declaration of function
‘get_float4_infinity’ [-Werror=implicit-function-declaration]
return Float4GetDatum(-get_float4_infinity());
^
btree_gin.c: In function ‘leftmostvalue_float8’:
btree_gin.c:242:2: error: implicit declaration of function
‘get_float8_infinity’ [-Werror=implicit-function-declaration]
return Float8GetDatum(-get_float8_infinity());
^

Please fix.

Something to consider before posting new version -- should we
change some of those macros to static inline (in the .h files) to
avoid double-evaluation hazards? They might perform as well or
even better that way, and remove a subtle programmer foot-gun.

Changing status to "Waiting on Author".

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2016-09-02 20:57:06 Re: Logical Replication WIP
Previous Message Tom Lane 2016-09-02 18:53:53 Re: [PATCH] COPY vs \copy HINT