From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | elionescu(at)yahoo(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org |
Subject: | Re: incorrect PostgreSQL documentation for pg_type |
Date: | 2024-08-02 15:12:34 |
Message-ID: | CAApHDvrnGysfw-YdrjrHAeqW105nVS7Wj=YY30gMB5B=91pr4g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Sat, 3 Aug 2024 at 02:54, PG Doc comments form
<noreply(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Олег Самойлов | 2024-08-05 08:20:58 | Re: Savepoints in plpgsql |
Previous Message | Tom Lane | 2024-08-02 15:11:44 | Re: incorrect PostgreSQL documentation for pg_type |