Re: Incorrect behaviour when using a GiST index on points - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Incorrect behaviour when using a GiST index on points
Date
Msg-id 18849.1329751370@sss.pgh.pa.us
Whole thread Raw
In response to Re: Incorrect behaviour when using a GiST index on points  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: Incorrect behaviour when using a GiST index on points
List pgsql-hackers
Alexander Korotkov <aekorotkov@gmail.com> writes:
> On Thu, Feb 16, 2012 at 11:43 AM, Alexander Korotkov
> <aekorotkov@gmail.com>wrote:
>> Described differences leads to incorrect behaviour of GiST index.
>> The question is: what is correct way to fix it? Should on_pb also use FP*
>> or consistent method should behave like on_pb?

> Any comments on this? Current behaviour definitely indicates a bug, and I'm
> ready to fix it. The only question: is this bug in on_pb or gist?

I'm inclined to think the right answer is to make on_pb use the FP*
macros, for consistency with other geometric operators.  But it's worth
asking whether that will actually fix the problem.  I've thought for
some time that we'd eventually find cases where geo_ops' use of fuzzy
comparisons breaks index behavior entirely, because it destroys natural
assumptions like the transitive law.  So that could eventually lead us
to rip out the FP* macros everywhere.

In any case, this doesn't seem like something we could back-patch;
it'd be a behavioral change in HEAD only.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: pgsql_fdw, FDW for PostgreSQL server
Next
From: Robert Haas
Date:
Subject: Re: REASSIGN OWNED lacks support for FDWs