Re: Undocumented functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Undocumented functions
Date: 2024-09-07 20:18:42
Message-ID: 2542640.1725740322@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marcos Pegoraro <marcos(at)f10(dot)com(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oliver Ford 2024-09-07 20:25:28 Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options
Previous Message Tom Lane 2024-09-07 20:10:31 Re: pgstattuple: fix free space calculation