Re: incorrect PostgreSQL documentation for pg_type - Mailing list pgsql-docs

From David Rowley
Subject Re: incorrect PostgreSQL documentation for pg_type
Date
Msg-id CAApHDvrnGysfw-YdrjrHAeqW105nVS7Wj=YY30gMB5B=91pr4g@mail.gmail.com
Whole thread Raw
In response to incorrect PostgreSQL documentation for pg_type  (PG Doc comments form <noreply@postgresql.org>)
List pgsql-docs
On Sat, 3 Aug 2024 at 02:54, PG Doc comments form
<noreply@postgresql.org> wrote:
> Table 51.63. pg_type Columns
> Name        Type            References
> ----        ----        -----------
> typinput        regproc         pg_proc.oid
> typoutput       regproc         pg_proc.oid
> typreceive      regproc         pg_proc.oid
> typsend         regproc         pg_proc.oid
> typmodin        regproc         pg_proc.oid
> typmodout       regproc         pg_proc.oid
> typanalyze      regproc         pg_proc.oid
>
> The correct reference is pg_proc.proname

The following query disagrees:

# select count(*) from pg_type t inner join pg_proc p on t.typinput = p.proname;
ERROR:  operator does not exist: regproc = name

The following two should hopefully be enough to convince you it's fine as is.

# select count(*) from pg_type t inner join pg_proc p on t.typinput = p.oid;
 count
-------
   627
(1 row)

# select count(*) from pg_type;
 count
-------
   627
(1 row)

Where you might be getting confused is the regproc type. Its output
function converts the Oid to text.

David



pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: incorrect PostgreSQL documentation for pg_type
Next
From: Олег Самойлов
Date:
Subject: Re: Savepoints in plpgsql