Re: Wrong varnullingrels for MERGE into a trigger-updatable view

From: solai v <solai(dot)cdac(at)gmail(dot)com>
To: Tender Wang <tndrwang(at)gmail(dot)com>
Cc: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Wrong varnullingrels for MERGE into a trigger-updatable view
Date: 2026-11-18 04:12:06
Message-ID: CAF0whucgR55r2qtTPhDUxrNnDH3yLi6_7qQx-j7Kw2BEDTsk0Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all,

I tested the v2 patch for the issue related to incorrect varnullingrels
handling when executing MERGE on a trigger-updatable view.

I was able to reproduce the reported error before applying the patch. After
applying the patch and rebuilding PostgreSQL, I ran the same test again,
and the MERGE statement completed successfully without the previous wrong
varnullingrels error.

The output was:

MERGE 0

I also reviewed the code changes in prepjointree.c. The patch appears to
address the issue by ensuring that the nulling-relid information is updated
consistently across the relevant MERGE expressions.

I ran the MERGE regression tests as well, and all tests passed.

Based on the reproduction, code review, and regression test results, the
patch looks good to me.

Regards,

solai

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ajin Cherian 2026-11-18 04:17:59 Re: Initial table sync copies the whole table when it is no longer published
Previous Message shveta malik 2026-11-18 03:39:56 Re: Initial table sync copies the whole table when it is no longer published