pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix MERGE's test for unreachable WHEN clauses.
Date: Tue, 10 Jan 2023 14:20:27 +0000
Message-ID: <E1pFFUI-002yl7-Uh@gemulon.postgresql.org> (raw)

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
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/38255f2d0059a101c3fb791d6523a9e66e55aa66

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(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1pFFUI-002yl7-Uh@gemulon.postgresql.org>
Permalink:  ../E1pFFUI-002yl7-Uh@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1pFFUI-002yl7-Uh@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: dean.a.rasheed@gmail.com
  Subject: Re: pgsql: Fix MERGE's test for unreachable WHEN clauses.
  In-Reply-To: <E1pFFUI-002yl7-Uh@gemulon.postgresql.org>
  References: <E1pFFUI-002yl7-Uh@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox