Re: Attribute of type record has wrong type error with MERGE ... WHEN NOT MATCHED BY SOURCE THEN DELETE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Tender Wang <tndrwang(at)gmail(dot)com>, Duncan Sands <duncan(dot)sands(at)deepbluecap(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Attribute of type record has wrong type error with MERGE ... WHEN NOT MATCHED BY SOURCE THEN DELETE
Date: 2025-03-10 19:11:20
Message-ID: 1207317.1741633880@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> Yeah, I think we can likely get away with that. We cannot back-patch
> the changes that added relid to the outfuncs/readfuncs representation,
> which means that the RTE's relid won't propagate to parallel workers,
> but I don't see why they'd need it. We only need that info to get
> as far as planning. I've not tried though.

OK, the attached patch for v15 passes check-world, with or without
force_parallel_mode. I'm inclined to commit the rewriteHandler.c
and parsenodes.h bits in a separate patch for commit log visibility.

It would be easy enough to leave the RTE's relkind and/or rellockmode
alone too, but I think the conservative approach is to not change
more than we have to in these old branches. There is some attraction
to making the behavior more like the newer branches, but still ...

regards, tom lane

Attachment Content-Type Size
generate-correct-vartype-for-whole-row-view-refs-15.patch text/x-diff 4.5 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-03-10 20:00:01 Re: BUG #18838: Missing characters in replication slot when bytea_output is set to "escape"
Previous Message Tom Lane 2025-03-10 17:52:42 Re: Attribute of type record has wrong type error with MERGE ... WHEN NOT MATCHED BY SOURCE THEN DELETE