pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Dean Rasheed <dean.a.rasheed@gmail.com>
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: Wed, 12 Mar 2025 21:13:34 -0400
Message-ID: <2588244.1741828414@sss.pgh.pa.us> (raw)
In-Reply-To: <2560748.1741824533@sss.pgh.pa.us>
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>

I wrote:
> 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.

Double ugh: that doesn't fix it, because we also do a round of
WRITE_READ_PARSE_PLAN_TREES checks on the rewriter output.
Not sure how to fix this, unless we lobotomize that write/read
check somehow.

			regards, tom lane





view thread (23+ messages)  latest in thread

Message-ID: <2588244.1741828414@sss.pgh.pa.us>
Permalink:  ../2588244.1741828414@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2588244.1741828414@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, andres@anarazel.de, dean.a.rasheed@gmail.com, 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: <2588244.1741828414@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