pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Add missing operator <->(box, point)
Date: Tue, 02 Jul 2019 15:13:30 -0400
Message-ID: <4682.1562094810@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPpHfdtq4+AhjBhjEMkeLqi46pz-dEUs3=SQG-_nSPsw+hHAyA@mail.gmail.com>
References: <f71ba19d-d989-63b6-f04a-abf02ad9345d@postgrespro.ru>
	<alpine.DEB.2.21.1904201526100.29102@lancre>
	<6935.1562040096@sss.pgh.pa.us>
	<2fe442bd-4e0c-56ba-eb62-f1b51f6b17f3@postgrespro.ru>
	<CAPpHfdtq4+AhjBhjEMkeLqi46pz-dEUs3=SQG-_nSPsw+hHAyA@mail.gmail.com>

Alexander Korotkov <a.korotkov@postgrespro.ru> writes:
> 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.

Yeah, I was just thinking that it was weird not to have the commutator
operators, independently of indexing considerations.  Seems like a
usability thing.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <4682.1562094810@sss.pgh.pa.us>
Permalink:  ../4682.1562094810@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4682.1562094810@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, a.korotkov@postgrespro.ru, n.gluhov@postgrespro.ru, coelho@cri.ensmp.fr
  Subject: Re: Add missing operator <->(box, point)
  In-Reply-To: <4682.1562094810@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox