Re: Commit fest 2014-12, let's begin! - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Commit fest 2014-12, let's begin!
Date
Msg-id CAPpHfdvzitZvnJNAn7iJYcv18jfG47QxHu_q2YoX9HYSa5a2Hg@mail.gmail.com
Whole thread Raw
In response to Re: Commit fest 2014-12, let's begin!  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Commit fest 2014-12, let's begin!  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Re: Commit fest 2014-12, let's begin!  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Mon, Dec 15, 2014 at 4:12 PM, Heikki Linnakangas <hlinnakangas@vmware.com> wrote:
On 12/15/2014 08:37 AM, Michael Paquier wrote:
On Mon, Dec 15, 2014 at 3:09 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Michael Paquier <michael.paquier@gmail.com> writes:
- Point to polygon distance operator
I looked at that briefly during the last fest, but was unsure whether it
was too entangled with the GiST patches that Heikki was looking at.
Recalling my memories of this morning, things are rather independent.

Right. I also looked at it briefly, but I wasn't sure if we really want it. AFAICT, no-one has actually asked for that operator, it was written only to be an example of an operator that would benefit from the knn-gist with recheck patch. If there is some other, real, use for the knn-gist with recheck patch, then I'm OK with that, but otherwise it's dubious to add an operator just so that it can then be made faster by another patch. That said, it seems quite harmless, so might as well commit it.

Lack of recheck is major limitation of KNN-GiST now. People are not asking for that because they don't know what is needed to implement exact KNN for PostGIS. Now they have to invent kluges like this:

WITH closest_candidates AS (
  SELECT
    streets.gid,
    streets.name,
    streets.geom
  FROM
    nyc_streets streets
  ORDER BY
    streets.geom <->
    'SRID=26918;POINT(583571.905921312 4506714.34119218)'::geometry
  LIMIT 100
)
SELECT gid, name
FROM closest_candidates
ORDER BY
  ST_Distance(
    geom,
    'SRID=26918;POINT(583571.905921312 4506714.34119218)'::geometry
    )
LIMIT 1;

See blog posts:

------
With best regards,
Alexander Korotkov.

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: speedup tidbitmap patch: hash BlockNumber
Next
From: Heikki Linnakangas
Date:
Subject: Re: Fractions in GUC variables