pgsql: Fix check_exclusion_or_unique_constraint for UNIQUE NULLS NOT DI

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix check_exclusion_or_unique_constraint for UNIQUE NULLS NOT DI
Date: 2022-08-04 18:16:40
Message-ID: E1oJfOi-000JNR-IL@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix check_exclusion_or_unique_constraint for UNIQUE NULLS NOT DISTINCT.

Adjusting this function was overlooked in commit 94aa7cc5f. The only
visible symptom (so far) is that INSERT ... ON CONFLICT could go into
an endless loop when inserting a null that has a conflict.

Richard Guo and Tom Lane, per bug #17558 from Andrew Kesper

Discussion: https://postgr.es/m/17558-3f6599ffcf52fd4a@postgresql.org

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3419d51e1957855f527b94ae983fe8503aafe15c

Modified Files
--------------
src/backend/executor/execIndexing.c | 18 ++++++++++++------
src/test/regress/expected/constraints.out | 5 +++--
src/test/regress/sql/constraints.sql | 5 +++--
3 files changed, 18 insertions(+), 10 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2022-08-04 19:30:33 pgsql: Revert recent changes to 002_pg_upgrade.pl.
Previous Message Tom Lane 2022-08-04 15:11:59 pgsql: Add proper regression test for the recent SRFs-in-pathkeys probl