pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix MERGE's test for unreachable WHEN clauses.
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix MERGE's test for unreachable WHEN clauses.
@ 2023-01-10 14:20  Dean Rasheed <dean.a.rasheed@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Dean Rasheed @ 2023-01-10 14:20 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix MERGE's test for unreachable WHEN clauses.
@ 2023-01-10 14:20  Dean Rasheed <dean.a.rasheed@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Dean Rasheed @ 2023-01-10 14:20 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-01-10 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 14:20 pgsql: Fix MERGE's test for unreachable WHEN clauses. Dean Rasheed <dean.a.rasheed@gmail.com>
2023-01-10 14:20 pgsql: Fix MERGE's test for unreachable WHEN clauses. Dean Rasheed <dean.a.rasheed@gmail.com>

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