Re: Add missing operator <->(box, point)

Поиск
Список
Период
Сортировка
Искать
От
Fabien COELHO
Тема
Re: Add missing operator <->(box, point)
Дата
Msg-id
alpine.DEB.2.21.1904201526100.29102@lancre
Ответ на
Список
Дерево обсуждения
Add missing operator <->(box, point) Nikita Glukhov <n.gluhov@postgrespro.ru>
Re: Add missing operator <->(box, point) Fabien COELHO <coelho@cri.ensmp.fr>
Re: Add missing operator <->(box, point) Tom Lane <tgl@sss.pgh.pa.us>
Re: Add missing operator <->(box, point) Nikita Glukhov <n.gluhov@postgrespro.ru>
Re: Add missing operator <->(box, point) Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: Add missing operator <->(box, point) Tom Lane <tgl@sss.pgh.pa.us>
Re: Add missing operator <->(box, point) Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: Add missing operator <->(box, point) Nikita Glukhov <n.gluhov@postgrespro.ru>
Re: Add missing operator <->(box, point) Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: Add missing operator <->(box, point) Alexander Korotkov <a.korotkov@postgrespro.ru>

Hello Nikita,

> Attached patches add missing distance operator <->(box, point).

Indeed.

> We already have reverse operator <->(point, box), but it can't be used 
> for kNN search in GiST and SP-GiST.  GiST and SP-GiST now support kNN 
> searches over more complex polygons and circles, but do not support more 
> simple boxes, which seems to be inconsistent.
>
> Description of the patches:
> 1. Add function dist_pb(box, point) and operator <->.

About this first patch: applies cleanly, compiles, "make check" ok.

No doc changes, but this was expected to work in the first place, 
according to the documention.

About the test, I'd suggest to name the result columns, eg "pt to box 
dist" and "box to pt dist", otherwise why all is repeated is unclear.

I notice that other distance tests do not test for commutativity. Are they 
also not implemented, or just not tested? If not implemented, I'd suggest 
to add them in the same batch. If not tested, maybe the patch should do as 
others, or maybe given the trivial implementation there should just be one 
test per commutted operator for coverage.

ISTM that the committer would need to "bump the catalog revision number" 
because it adds new functions & operators.

-- 
Fabien.


В списке pgsql-hackers по дате отправления
От: Bruce Momjian
Дата:
От: Tom Lane
Дата:
FAQ