pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tender Wang <tndrwang@gmail.com>
Cc: Duncan Sands <duncan.sands@deepbluecap.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Attribute of type record has wrong type error with MERGE ... WHEN NOT MATCHED BY SOURCE THEN DELETE
Date: Thu, 13 Mar 2025 12:15:33 -0400
Message-ID: <2814386.1741882533@sss.pgh.pa.us> (raw)
In-Reply-To: <CAEZATCXDGX1M-rWS_paRTbJDMpqCT1OtKZ44ng5H6qxAsSGeSA@mail.gmail.com>
References: <971078.1741629162@sss.pgh.pa.us>
	<1207317.1741633880@sss.pgh.pa.us>
	<CAEZATCUQjxowkRfG89YOWStPvJ3xpJW9wDNccnZOVJzSAHwJxA@mail.gmail.com>
	<1213530.1741637326@sss.pgh.pa.us>
	<1620306.1741713271@sss.pgh.pa.us>
	<CAEZATCVcQXJ3KQUZyN-2=jzk6U1rByJ74Xfq84zeCGXxPQjEsg@mail.gmail.com>
	<1638469.1741723564@sss.pgh.pa.us>
	<1834982.1741729881@sss.pgh.pa.us>
	<CAEZATCWSTZSdzSZ9dnzbTpSa97Uit=KFz4KSgPfYLSwb4+P01w@mail.gmail.com>
	<2160671.1741794569@sss.pgh.pa.us>
	<m2gyjjk6hazud7hezz25t7aw7rjv73fthkct4jqbvrnu3ezqz3@nx3m53r7scce>
	<2560748.1741824533@sss.pgh.pa.us>
	<2588244.1741828414@sss.pgh.pa.us>
	<2625732.1741829945@sss.pgh.pa.us>
	<CAEZATCXDGX1M-rWS_paRTbJDMpqCT1OtKZ44ng5H6qxAsSGeSA@mail.gmail.com>

Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> On Thu, 13 Mar 2025 at 01:39, Tom Lane <tgl@sss.pgh.pa.us> 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





view thread (23+ messages)

Message-ID: <2814386.1741882533@sss.pgh.pa.us>
Permalink:  ../2814386.1741882533@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2814386.1741882533@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, dean.a.rasheed@gmail.com, andres@anarazel.de, tndrwang@gmail.com, duncan.sands@deepbluecap.com, 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: <2814386.1741882533@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox