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)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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
Дата:
Сообщение: Re: finding changed blocks using WAL scanning
Следующее
От: Tom Lane
Дата:
Сообщение: Re: TM format can mix encodings in to_char()