Add missing operator <->(box, point)

Поиск
Список
Период
Сортировка
От Nikita Glukhov
Тема Add missing operator <->(box, point)
Дата
Msg-id f71ba19d-d989-63b6-f04a-abf02ad9345d@postgrespro.ru
обсуждение исходный текст
Ответы Re: Add missing operator <->(box, point)
Re: Add missing operator <->(box, point)
Список pgsql-hackers
Hi, hackers.

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

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 <->.

2. Add <-> to GiST box_ops.    Extracted gist_box_distance_helper() common for gist_box_distance() and   gist_bbox_distance().

3. Add <-> to SP-GiST.    Changed only catalog and tests.  Box case is already checked in  spg_box_quad_leaf_consistent():    out->recheckDistances = distfnoid == F_DIST_POLYP;


--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Сообщение: Re: pgbench MAX_ARGS
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Making all nbtree entries unique by having heap TIDs participatein comparisons