Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oCVw7-0001Og-4E for pgsql-bugs@arkaria.postgresql.org; Sat, 16 Jul 2022 00:45:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oCVw5-00066w-La for pgsql-bugs@arkaria.postgresql.org; Sat, 16 Jul 2022 00:45:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oCVw5-00064N-DG for pgsql-bugs@lists.postgresql.org; Sat, 16 Jul 2022 00:45:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oCVw1-0005f6-8n for pgsql-bugs@lists.postgresql.org; Sat, 16 Jul 2022 00:45:33 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 26G0jRhJ3546149; Fri, 15 Jul 2022 20:45:27 -0400 From: Tom Lane To: Walker Philips cc: pgsql-bugs@lists.postgresql.org Subject: Re: pg_catalog.pg_proc procedure has correct proargnames array, but proargtypes is empty In-reply-to: References: Comments: In-reply-to Walker Philips message dated "Fri, 15 Jul 2022 18:37:47 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3546147.1657932327.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 15 Jul 2022 20:45:27 -0400 Message-ID: <3546148.1657932327@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Walker Philips writes: > The following function's metadata is not correctly reported in the pg_pr= oc > table (see picture below). Looks fine to me: regression=3D# CREATE OR REPLACE FUNCTION get_period_type_adjustment(perio= d_type_id = integer) RETURNS numeric ... regression=3D# \x Expanded display is on. regression=3D# select * from pg_proc where proname =3D 'get_period_type_ad= justment'; ... 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