Re: Attribute of type record has wrong type error with MERGE ... WHEN NOT MATCHED BY SOURCE THEN DELETE - Mailing list pgsql-bugs

From Dean Rasheed
Subject Re: Attribute of type record has wrong type error with MERGE ... WHEN NOT MATCHED BY SOURCE THEN DELETE
Date
Msg-id CAEZATCWSTZSdzSZ9dnzbTpSa97Uit=KFz4KSgPfYLSwb4+P01w@mail.gmail.com
Whole thread Raw
In response to Re: Attribute of type record has wrong type error with MERGE ... WHEN NOT MATCHED BY SOURCE THEN DELETE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Attribute of type record has wrong type error with MERGE ... WHEN NOT MATCHED BY SOURCE THEN DELETE
List pgsql-bugs
On Tue, 11 Mar 2025 at 21:51, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Yeah, that is a better way.  In exchange for a slightly dirtier
> data structure, we now have essentially all the relevant code in
> makeWholeRowVar: correctness only depends on its different case
> branches agreeing, rather than on some not-terribly-similar code
> way over in prepjointree.c.

Agreed. Having all the code in one place makes it easier to see that
it's doing the same thing before and after RTE expansion.

> I also took the opportunity to split off the old-branch adjustment
> of rewriteHandler.c, so that the HEAD and v15 versions of the main
> bug fix patch are nearly the same.

LGTM. I did some more testing and thought about it a little more, and
I can't see any other ways to break it.

Regards,
Dean



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18839: ARMv7 builds fail due to missing __crc32cw and similar
Next
From: Amit Langote
Date:
Subject: Re: BUG #18830: ExecInitMerge Segfault on MERGE