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 1tslDk-005Ksu-Lf for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Mar 2025 16:15:44 +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 1tslDj-00HJ70-7W for pgsql-bugs@arkaria.postgresql.org; Thu, 13 Mar 2025 16:15:43 +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 1tslDi-00HJ6T-V4 for pgsql-bugs@lists.postgresql.org; Thu, 13 Mar 2025 16:15:42 +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 1tslDh-002dkc-0T for pgsql-bugs@lists.postgresql.org; Thu, 13 Mar 2025 16:15:42 +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 52DGFX0j2814387; Thu, 13 Mar 2025 12:15:33 -0400 From: Tom Lane To: Dean Rasheed cc: Andres Freund , 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> <2560748.1741824533@sss.pgh.pa.us> <2588244.1741828414@sss.pgh.pa.us> <2625732.1741829945@sss.pgh.pa.us> Comments: In-reply-to Dean Rasheed message dated "Thu, 13 Mar 2025 15:10:58 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2814385.1741882533.1@sss.pgh.pa.us> Date: Thu, 13 Mar 2025 12:15:33 -0400 Message-ID: <2814386.1741882533@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Dean Rasheed writes: > On Thu, 13 Mar 2025 at 01:39, Tom Lane wrote: >> After some thought, I'm inclined to suggest that we just remove >> the post-rewrite check in the affected branches. > I don't really have any better ideas. I guess that if we wanted to > keep this check in back branches, we could copy across the subquery > RTE relids onto the new query, like we do for queryIds. But it would > be somewhat messy, because we'd have to do something like walk each > query pulling a list of its RTE_SUBQUERY RTEs, and then walk both > lists, copying relids over. So maybe not worth the effort. Yeah, I don't think it's worth it either -- testing something that's not actually the behavior of the code-under-test seems pointless. I've not thought of any better way, so pushed that one to get the buildfarm back to green. There's always "git revert" if somebody has a better idea. regards, tom lane