Re: Add missing operator <->(box, point)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add missing operator <->(box, point)
Date: 2019-07-02 04:01:36
Message-ID: 6935.1562040096@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

[ warning, drive-by comment ahead ]

Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> writes:
> 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.

Yeah ... just looking at operators named <->, I see

regression=# select oid, oid::regoperator, oprcom, oprcode from pg_operator where oprname = '<->';
oid | oid | oprcom | oprcode
------+----------------------+--------+---------------------------
517 | <->(point,point) | 517 | point_distance
613 | <->(point,line) | 0 | dist_pl
614 | <->(point,lseg) | 0 | dist_ps
615 | <->(point,box) | 0 | dist_pb
616 | <->(lseg,line) | 0 | dist_sl
617 | <->(lseg,box) | 0 | dist_sb
618 | <->(point,path) | 0 | dist_ppath
706 | <->(box,box) | 706 | box_distance
707 | <->(path,path) | 707 | path_distance
708 | <->(line,line) | 708 | line_distance
709 | <->(lseg,lseg) | 709 | lseg_distance
712 | <->(polygon,polygon) | 712 | poly_distance
1520 | <->(circle,circle) | 1520 | circle_distance
1522 | <->(point,circle) | 3291 | dist_pc
3291 | <->(circle,point) | 1522 | dist_cpoint
3276 | <->(point,polygon) | 3289 | dist_ppoly
3289 | <->(polygon,point) | 3276 | dist_polyp
1523 | <->(circle,polygon) | 0 | dist_cpoly
1524 | <->(line,box) | 0 | dist_lb
5005 | <->(tsquery,tsquery) | 0 | pg_catalog.tsquery_phrase
(20 rows)

It's not clear to me why to be particularly more excited about
<->(box, point) than about the other missing cases here.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message amul sul 2019-07-02 04:47:17 Re: [HACKERS] advanced partition matching algorithm for partition-wise join
Previous Message Peter Geoghegan 2019-07-02 03:09:20 Re: Code comment change