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

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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-12 10:16:13
Message-ID: CAEZATCWSTZSdzSZ9dnzbTpSa97Uit=KFz4KSgPfYLSwb4+P01w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 11 Mar 2025 at 21:51, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Ashutosh Bapat 2025-03-12 10:26:08 Re: Test mail for pgsql-hackers
Previous Message PG Bug reporting form 2025-03-12 05:40:28 BUG #18839: ARMv7 builds fail due to missing __crc32cw and similar