Re: operator @@ is not supported by path; doc says otherwise

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Anton Voloshin <a(dot)voloshin(at)postgrespro(dot)ru>
Cc: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: operator @@ is not supported by path; doc says otherwise
Date: 2021-12-06 18:49:17
Message-ID: 3351974.1638816557@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Anton Voloshin <a(dot)voloshin(at)postgrespro(dot)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

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2021-12-07 14:28:09 set time zone
Previous Message Anton Voloshin 2021-12-06 16:46:16 operator @@ is not supported by path; doc says otherwise