Re: BUG #17558: 15beta2: Endless loop with UNIQUE NULLS NOT DISTINCT and INSERT ... ON CONFLICT
От | Tom Lane |
---|---|
Тема | Re: BUG #17558: 15beta2: Endless loop with UNIQUE NULLS NOT DISTINCT and INSERT ... ON CONFLICT |
Дата | |
Msg-id | 2023369.1658763580@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | BUG #17558: 15beta2: Endless loop with UNIQUE NULLS NOT DISTINCT and INSERT ... ON CONFLICT (PG Bug reporting form <noreply@postgresql.org>) |
Ответы |
Re: BUG #17558: 15beta2: Endless loop with UNIQUE NULLS NOT DISTINCT and INSERT ... ON CONFLICT
|
Список | pgsql-bugs |
PG Bug reporting form <noreply@postgresql.org> writes: > In PostgreSQL 15 beta, when I try to insert a NULL value which violates a > "UNIQUE NULLS NOT DISTINCT" constraint, PostgreSQL will get stuck in an > endless loop if the command includes an "ON CONFLICT" clause. > CREATE TABLE test (val TEXT UNIQUE NULLS NOT DISTINCT); > INSERT INTO test (val) VALUES ('a') ON CONFLICT DO NOTHING; -- inserts 'a' > INSERT INTO test (val) VALUES ('a') ON CONFLICT DO NOTHING; -- does > nothing > INSERT INTO test (val) VALUES (NULL) ON CONFLICT DO NOTHING; -- inserts > NULL > INSERT INTO test (val) VALUES (NULL) ON CONFLICT DO NOTHING; -- > unresponsive Yup, still a problem in HEAD. It correctly reports an error if you just "INSERT INTO test (val) VALUES (NULL)", but something in the ON CONFLICT code path seems not to be on board with this. Peter? regards, tom lane
В списке pgsql-bugs по дате отправления: