pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Anton Voloshin <a.voloshin@postgrespro.ru>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: operator @@ is not supported by path; doc says otherwise
Date: Mon, 06 Dec 2021 13:49:17 -0500
Message-ID: <3351974.1638816557@sss.pgh.pa.us> (raw)
In-Reply-To: <5405b243-4523-266e-6139-ad9f80a9d9fc@postgrespro.ru>
References: <5405b243-4523-266e-6139-ad9f80a9d9fc@postgrespro.ru>

Anton Voloshin <a.voloshin@postgrespro.ru> 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





view thread (3+ messages)

Message-ID: <3351974.1638816557@sss.pgh.pa.us>
Permalink:  ../3351974.1638816557@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3351974.1638816557@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-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, a.voloshin@postgrespro.ru, pgsql-docs@lists.postgresql.org
  Subject: Re: operator @@ is not supported by path; doc says otherwise
  In-Reply-To: <3351974.1638816557@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