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 1nlD4H-00075j-Ir for pgsql-bugs@arkaria.postgresql.org; Sun, 01 May 2022 17:09:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nlD4F-0004Vd-Sw for pgsql-bugs@arkaria.postgresql.org; Sun, 01 May 2022 17:09:07 +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 1nlD4F-0004VT-Ki for pgsql-bugs@lists.postgresql.org; Sun, 01 May 2022 17:09:07 +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 1nlD48-0006Kv-TJ for pgsql-bugs@lists.postgresql.org; Sun, 01 May 2022 17:09:06 +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 241H8vtJ1683366; Sun, 1 May 2022 13:08:57 -0400 From: Tom Lane To: "David G. Johnston" cc: d , PostgreSQL mailing lists Subject: Re: ERROR: type of parameter 1 (fruit2) does not match that when preparing the plan (fruit1) In-reply-to: References: <20220430162319.67986afa@metairie.davudsplace.net> Comments: In-reply-to "David G. Johnston" message dated "Sun, 01 May 2022 08:58:38 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1683364.1651424937.1@sss.pgh.pa.us> Date: Sun, 01 May 2022 13:08:57 -0400 Message-ID: <1683365.1651424937@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > On Sun, May 1, 2022 at 8:44 AM d wrote: >> CREATE OR REPLACE FUNCTION record_to_form_data(p_r record) > Not a bug, it is a documented limitation. FWIW, it does seem to work as desired if you declare the argument as "anyelement". Maybe we could improve this situation by treating a "record" parameter as polymorphic, though that might cause some odd inconsistencies with plpgsql's historical treatment of "record" local variables. regards, tom lane