Fix check_exclusion_or_unique_constraint for UNIQUE NULLS NOT DISTINCT.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 4 Aug 2022 18:16:26 +0000 (14:16 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 4 Aug 2022 18:16:26 +0000 (14:16 -0400)
commit3419d51e1957855f527b94ae983fe8503aafe15c
tree5de3edbbdbbf8f1ee35cdc0ddbf765bc88d13a98
parent4c7b16312ea3381b04a412c91f1e882cd928806e
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
src/backend/executor/execIndexing.c
src/test/regress/expected/constraints.out
src/test/regress/sql/constraints.sql