Re: MERGE fails to reject source references in NOT MATCHED BY SOURCE actions

From: Tender Wang <tndrwang(at)gmail(dot)com>
To: Joao Rito <joaovictor(dot)rito(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Subject: Re: MERGE fails to reject source references in NOT MATCHED BY SOURCE actions
Date: 2026-11-21 02:42:10
Message-ID: CAHewXN=oaHn=jeV5LTRPSvZ0D2w5GUsTqRu4M62wuqcG2_p7gQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Joao Rito <joaovictor(dot)rito(at)gmail(dot)com> 于2026年11月19日周四 03:47写道:
>
> c) parse_merge.c now ends with an extra blank line after the closing
> brace of transformMergeStmt(), left over from removing
> setNamespaceVisibilityForRTE(). pgindent or git diff --check would
> probably point at it.
>

Done.

> Overall the patch looks good to me and fixes the problem as
> described. The simplification (no flag mutation, a temporary
> namespace per action, restored afterwards) is easier to read than the
> old code.

Thanks for the review.

I've cc'd Dean since this issue dates back to the introduction of WHEN
NOT MATCHED BY SOURCE.
Dean, could you take a look at the namespace handling in v2 when you
have a chance?

--
Tender Wang

Attachment Content-Type Size
v2-0001-Fix-source-visibility-in-MERGE-NOT-MATCHED-BY-SOU.patch text/plain 9.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Baji Shaik 2026-11-21 01:00:49 Three more loops that let a function drop a not-yet-processed index/partition