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 1oZF8h-0002Js-Ba for pgsql-bugs@arkaria.postgresql.org; Fri, 16 Sep 2022 17:28:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oZF8f-00074x-Fq for pgsql-bugs@arkaria.postgresql.org; Fri, 16 Sep 2022 17:28:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZF8e-00074m-Up for pgsql-bugs@lists.postgresql.org; Fri, 16 Sep 2022 17:28:28 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oZF8b-0006ll-RK for pgsql-bugs@lists.postgresql.org; Fri, 16 Sep 2022 17:28:27 +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 28GHS28r3841539; Fri, 16 Sep 2022 13:28:02 -0400 From: Tom Lane To: Japin Li cc: mjurca@centrum.cz, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17610: Use of multiple composite types incompatible with record-typed function parameter In-reply-to: References: <17610-fb1eef75bf6c2364@postgresql.org> <4048043.1662653834@sss.pgh.pa.us> <4102534.1662662207@sss.pgh.pa.us> Comments: In-reply-to Japin Li message dated "Fri, 09 Sep 2022 09:07:04 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3841529.1663349282.1@sss.pgh.pa.us> Date: Fri, 16 Sep 2022 13:28:02 -0400 Message-ID: <3841530.1663349282@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Japin Li writes: > On Fri, 09 Sep 2022 at 02:36, Tom Lane wrote: >> So really the way we ought to fix this is to upgrade the parser >> APIs so that plpgsql could deal with "$1.f1" as a unit. But >> that seems like a lot of work, and it would certainly not be >> back-patchable. > Tested and looks good! After letting this bake awhile, I still haven't thought of a better idea. Also, even if we wanted to invest the effort to make "$1.f1" an integrated construct, I think you could still easily break it, say with syntax like "($1).f1". The variant "(arg).f1" would be problematic too without this change. Hence, pushed as-is. regards, tom lane