| От | Nikita Glukhov |
|---|---|
| Тема | Re: Add missing operator <->(box, point) |
| Дата | |
| Msg-id | 9c1f39b6-7e11-fbda-d79a-3ff8a40eb1a2@postgrespro.ru обсуждение |
| Ответ на | Re: Add missing operator <->(box, point) (Alexander Korotkov <a.korotkov@postgrespro.ru>) |
| Ответы |
Re: Add missing operator <->(box, point)
|
| Список | pgsql-hackers |
Attached 3rd version of the patches.
On 02.07.2019 21:55, Alexander Korotkov wrote:
On Tue, Jul 2, 2019 at 9:19 PM Nikita Glukhov <n.gluhov@postgrespro.ru> wrote:We could use commuted "const <-> var" operators for kNN searches, but the current implementation requires the existence of "var <-> const" operators, and order-by-op clauses are rebuilt using them (see match_clause_to_ordering_op() at /src/backend/optimizer/path/indxpath.c).But probably it's still worth to just add commutator for every <-> operator and close this question. Otherwise, it may arise again once we want to add some more kNN support to opclasses or something. On the other hand, are we already going to limit oid consumption?
All missing distance operators were added to the first patch.
On 08.07.2019 18:22, Alexander Korotkov wrote:
On Mon, Mar 11, 2019 at 2:49 AM Nikita Glukhov <n.gluhov@postgrespro.ru> wrote:2. Add <-> to GiST box_ops. Extracted gist_box_distance_helper() common for gist_box_distance() and gist_bbox_distance().For me it doesn't look worth having two distinct functions gist_box_distance_helper() and gist_bbox_distance(). What about having just one and leave responsibility for recheck flag to the caller?
gist_bbox_distance() was removed. But maybe it would be better to replace two identical functions gist_circle_distance() and gist_poly_distance() with the single 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;So, it seems to be fix of oversight in 2a6368343ff4. But assuming fixing this requires catalog changes, we shouldn't backpatch this.
-- Nikita Glukhov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера