Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hi9zV-0005UW-5z for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2019 04:02:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hi9zT-0007ML-1I for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2019 04:01:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hi9zS-0007Ln-NK for pgsql-hackers@lists.postgresql.org; Tue, 02 Jul 2019 04:01:58 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hi9zL-00075u-CM for pgsql-hackers@postgresql.org; Tue, 02 Jul 2019 04:01:58 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x6241aJR006936; Tue, 2 Jul 2019 00:01:36 -0400 From: Tom Lane To: Fabien COELHO cc: Nikita Glukhov , PostgreSQL Hackers Subject: Re: Add missing operator <->(box, point) In-reply-to: References: Comments: In-reply-to Fabien COELHO message dated "Sat, 20 Apr 2019 15:41:11 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6934.1562040096.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 02 Jul 2019 00:01:36 -0400 Message-ID: <6935.1562040096@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk [ warning, drive-by comment ahead ] Fabien COELHO writes: > I notice that other distance tests do not test for commutativity. Are th= ey = > also not implemented, or just not tested? If not implemented, I'd sugges= t = > to add them in the same batch. Yeah ... just looking at operators named <->, I see regression=3D# select oid, oid::regoperator, oprcom, oprcode from pg_opera= tor where oprname =3D '<->'; 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