Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tsW8E-002lu1-5W for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Mar 2025 00:09:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tsW8C-00Gf8u-KG for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Mar 2025 00:09:00 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tsW8C-00Gf8l-BP for pgsql-bugs@lists.postgresql.org; Thu, 13 Mar 2025 00:09:00 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tsW8A-002W4L-0t for pgsql-bugs@lists.postgresql.org; Thu, 13 Mar 2025 00:08:59 +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 52D08rUW2560749; Wed, 12 Mar 2025 20:08:53 -0400 From: Tom Lane To: Andres Freund cc: Dean Rasheed , Tender Wang , Duncan Sands , pgsql-bugs@lists.postgresql.org Subject: Re: Attribute of type record has wrong type error with MERGE ... WHEN NOT MATCHED BY SOURCE THEN DELETE In-reply-to: References: <971078.1741629162@sss.pgh.pa.us> <1207317.1741633880@sss.pgh.pa.us> <1213530.1741637326@sss.pgh.pa.us> <1620306.1741713271@sss.pgh.pa.us> <1638469.1741723564@sss.pgh.pa.us> <1834982.1741729881@sss.pgh.pa.us> <2160671.1741794569@sss.pgh.pa.us> Comments: In-reply-to Andres Freund message dated "Wed, 12 Mar 2025 18:45:52 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2560747.1741824533.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 12 Mar 2025 20:08:53 -0400 Message-ID: <2560748.1741824533@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > This seems to have introduce some breakage for 13-15. E.g. on > sifaka: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dsifaka&dt=3D20= 25-03-12%2016%3A58%3A51 > which has > 'CPPFLAGS' =3D> '-DWRITE_READ_PARSE_PLAN_TREES -DSTRESS_SORT_INT_MIN= -DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS' Ugh. I supposed that it was okay that 317aba70e etc. didn't touch outfuncs/readfuncs, but I did not think of -DWRITE_READ_PARSE_PLAN_TREES. Perhaps a good hack to deal with that is to make setrefs.c clear out relid for RTE_SUBQUERY RTEs in those branches. Then, in the same way that the rte->function hack doesn't escape the planner, this one wouldn't either. regards, tom lane