Re: Undocumented functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Undocumented functions
Date
Msg-id 2542640.1725740322@sss.pgh.pa.us
Whole thread Raw
In response to Undocumented functions  (Marcos Pegoraro <marcos@f10.com.br>)
Responses Re: Undocumented functions
List pgsql-hackers
Marcos Pegoraro <marcos@f10.com.br> writes:
> Example, elem_contained_by_range is not documented. I know I can use
> select 2 <@ '[1,3]'::int4range
> But why is that function not documented ?

Functions that are primarily meant to implement operators are
normally not documented separately: we feel it would bloat the
docs without adding a lot.  There are pg_description entries for
them, eg

regression=# \df+ elem_contained_by_range
                      List of functions
   Schema   |          Name           | Result data type | Argument data types  | Type | Volatility | Parallel |  Owner
 | Security | Access privileges | Language |      Internal name      |          Description           

------------+-------------------------+------------------+----------------------+------+------------+----------+----------+----------+-------------------+----------+-------------------------+-------------------------------
 pg_catalog | elem_contained_by_range | boolean          | anyelement, anyrange | func | immutable  | safe     |
postgres| invoker  |                   | internal | elem_contained_by_range | implementation of <@ operator 

                                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
(1 row)

I think pg_relation_is_updatable is primarily meant as support for the
information_schema views, which may explain why it's not in the docs
either.  There's less of a formal policy about functions underlying
system views, but the majority of them probably aren't documented.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgstattuple: fix free space calculation
Next
From: Tom Lane
Date:
Subject: Re: pgstattuple: fix free space calculation