Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muJ3E-0005WR-2F for pgsql-docs@arkaria.postgresql.org; Mon, 06 Dec 2021 18:49:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1muJ3C-0002g6-VG for pgsql-docs@arkaria.postgresql.org; Mon, 06 Dec 2021 18:49:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muJ3C-0002ft-Nk for pgsql-docs@lists.postgresql.org; Mon, 06 Dec 2021 18:49:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1muJ3A-0001ES-32 for pgsql-docs@lists.postgresql.org; Mon, 06 Dec 2021 18:49:21 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1B6InHv43351975; Mon, 6 Dec 2021 13:49:17 -0500 From: Tom Lane To: Anton Voloshin cc: pgsql-docs@lists.postgresql.org Subject: Re: operator @@ is not supported by path; doc says otherwise In-reply-to: <5405b243-4523-266e-6139-ad9f80a9d9fc@postgrespro.ru> References: <5405b243-4523-266e-6139-ad9f80a9d9fc@postgrespro.ru> Comments: In-reply-to Anton Voloshin message dated "Mon, 06 Dec 2021 23:46:16 +0700" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3351973.1638816556.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Mon, 06 Dec 2021 13:49:17 -0500 Message-ID: <3351974.1638816557@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Anton Voloshin writes: > The documentation for 13 and 14 says in "Geometric Functions and > Operators" https://www.postgresql.org/docs/14/functions-geometry.html: >>> @@ geometric_type → point >>> Computes the center point. Available for box, lseg, path, polygon, circle. >>> @@ box '(2,2),(0,0)' → (1,1) > However, apparently, this operator does not work for path: >>> postgres=# SELECT @@ path '[(0,0),(0,1)]'; >>> ERROR: function "path_center" not implemented The fact that this operator is documented is probably my fault --- when I went through the operator tables not long ago, I made sure there was an entry for every operator listed in the system catalogs. It didn't enter my mind that some of them might be pointing at useless stubs :-(. Looking through geo_ops.c, I see that not only path_center but also dist_lb, dist_bl, close_sl, close_lb, poly_distance error out with "not implemented". Given that that code has sat there for more than 20 years with nobody coming to finish the job, I think we should just rip those functions and catalog entries out altogether. It's misleading and probably a small waste of cycles to have useless entries in pg_proc and pg_operator. regards, tom lane