Re: Add missing operator <->(box, point) - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Add missing operator <->(box, point)
Date
Msg-id CAPpHfdtq4+AhjBhjEMkeLqi46pz-dEUs3=SQG-_nSPsw+hHAyA@mail.gmail.com
Whole thread Raw
In response to Re: Add missing operator <->(box, point)  (Nikita Glukhov <n.gluhov@postgrespro.ru>)
Responses Re: Add missing operator <->(box, point)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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?

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



pgsql-hackers by date:

Previous
From: Nikita Glukhov
Date:
Subject: Re: Add missing operator <->(box, point)
Next
From: Tom Lane
Date:
Subject: Re: [PATCH v5] Show detailed table persistence in \dt+