Re: KNN-GiST with recheck - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: KNN-GiST with recheck
Date
Msg-id 548EFB45.1000705@vmware.com
Whole thread Raw
In response to Re: KNN-GiST with recheck  (Emre Hasegeli <emre@hasegeli.com>)
List pgsql-hackers
On 08/03/2014 04:48 PM, Emre Hasegeli wrote:
>>> 1. This patch introduces a new "polygon <-> point" operator. That seems
>>> useful on its own, with or without this patch.
>>
>> Yeah, but exact-knn cant come with no one implementation. But it would
>> better come in a separate patch.
>
> I tried to split them.  Separated patches are attached.  I changed
> the order of the arguments as point <-> polygon, because point was
> the first one on all the others.  Its commutator was required for
> the index, so I added it on the second patch.  I also added tests
> for the operator.  I think it is ready for committer as a separate
> patch.  We can add it to the open CommitFest.

Ok, committed this part now with minor changes. The implementation was 
copy-pasted from circle <-> polygon, so I put the common logic to a 
dist_ppoly_internal function, and called that in both dist_cpoly and 
dist_ppoly.

I was surprised that there were no documentation changes in the patch, 
but looking at the docs, we just list the geometric operators without 
explaining what the argument types are. That's not very comprehensive, 
might be good to expand the docs on that, but it's not this patch's fault.

- Heikki




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Something is broken in logical decoding with CLOBBER_CACHE_ALWAYS
Next
From: Peter Eisentraut
Date:
Subject: Re: Fractions in GUC variables