Re: pg_catalog.pg_proc procedure has correct proargnames array, but proargtypes is empty
От
Tom Lane
Тема
Re: pg_catalog.pg_proc procedure has correct proargnames array, but proargtypes is empty
Дата
Msg-id
3546148.1657932327@sss.pgh.pa.us
Ответ на
pg_catalog.pg_proc procedure has correct proargnames array, but proargtypes is empty (Walker Philips)
Список
Дерево обсуждения
pg_catalog.pg_proc procedure has correct proargnames array, but proargtypes is empty Walker Philips <wphilips53@gmail.com>
Re: pg_catalog.pg_proc procedure has correct proargnames array, but proargtypes is empty Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_catalog.pg_proc procedure has correct proargnames array, but proargtypes is empty David Rowley <dgrowleyml@gmail.com>
Re: pg_catalog.pg_proc procedure has correct proargnames array, but proargtypes is empty Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_catalog.pg_proc procedure has correct proargnames array, but proargtypes is empty Walker Philips <wphilips53@gmail.com>
Re: pg_catalog.pg_proc procedure has correct proargnames array, but proargtypes is empty Tom Lane <tgl@sss.pgh.pa.us>
Walker Philips 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
В списке pgsql-bugs по дате отправления
От: David Rowley
Дата:
От: Tom Lane
Дата: