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