On Sat, 3 Aug 2024 at 02:54, PG Doc comments form
<nore...@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


Reply via email to