pgsql: Fix MERGE's test for unreachable WHEN clauses.

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix MERGE's test for unreachable WHEN clauses.
Date: 2023-01-10 14:20:27
Message-ID: E1pFFUI-002yl6-TL@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix MERGE's test for unreachable WHEN clauses.

The former code would only detect an unreachable WHEN clause if it had
an AND condition. Fix, so that unreachable unconditional WHEN clauses
are also detected.

Back-patch to v15, where MERGE was added.

Discussion: https://postgr.es/m/CAEZATCVQ=7E2z4cSBB49jjeGGsB6WeoYQY32NDeSvcHiLUZ=ow@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f026c16a2c5a3ee5d7aa6f85333ec80c905913ba

Modified Files
--------------
src/backend/parser/parse_merge.c | 6 +++---
src/test/regress/expected/merge.out | 2 +-
src/test/regress/sql/merge.sql | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2023-01-10 15:22:05 Re: pgsql: Fix the display of lock information for specktoken.
Previous Message Erik Rijkers 2023-01-10 12:40:03 Re: pgsql: Fix the display of lock information for specktoken.