From: Tom Lane <tgl@sss.pgh.pa.us>
To: Walker Philips <wphilips53@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: pg_catalog.pg_proc procedure has correct proargnames array, but proargtypes is empty
Date: Fri, 15 Jul 2022 20:45:27 -0400
Message-ID: <3546148.1657932327@sss.pgh.pa.us> (raw)
In-Reply-To: <CAFssDw=Hs5i1VNAaafNdDdvMNCF0gh7f4x=D-Of1eUJDhGin5A@mail.gmail.com>
References: <CAFssDw=Hs5i1VNAaafNdDdvMNCF0gh7f4x=D-Of1eUJDhGin5A@mail.gmail.com>
Walker Philips <wphilips53@gmail.com> writes:
> The following function's metadata is not correctly reported in the pg_proc
> table (see picture below).
Looks fine to me:
regression=# CREATE OR REPLACE FUNCTION get_period_type_adjustment(period_type_id
integer)
RETURNS numeric
...
regression=# \x
Expanded display is on.
regression=# select * from pg_proc where proname = 'get_period_type_adjustment';
...
pronargs | 1
pronargdefaults | 0
prorettype | 1700
proargtypes | 23
proallargtypes |
proargmodes |
proargnames | {period_type_id}
proargdefaults |
...
One IN integer argument named period_type_id, result type numeric.
Note the comments in
https://www.postgresql.org/docs/devel/catalog-pg-proc.html
that proallargtypes etc. are generally set to NULL if they wouldn't
carry any additional data. This is a choice we made a long time
ago to prioritize storage space over simplicity of implementation.
I don't know whether we'd make the same choice in a green field
today ... but we're not going to change it now, because the ensuing
confusion would be pretty bad.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, wphilips53@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: pg_catalog.pg_proc procedure has correct proargnames array, but proargtypes is empty
In-Reply-To: <3546148.1657932327@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox