Re: BUG #17532: Prepared statements and insert on conflict can fail on the 6th execution
От | David G. Johnston |
---|---|
Тема | Re: BUG #17532: Prepared statements and insert on conflict can fail on the 6th execution |
Дата | |
Msg-id | CAKFQuwbsepgM=Q6-Y9cFcJGm1GzDwWvsFv7gnmGEqUB69K2+yQ@mail.gmail.com обсуждение исходный текст |
Ответ на | BUG #17532: Prepared statements and insert on conflict can fail on the 6th execution (PG Bug reporting form <noreply@postgresql.org>) |
Список | pgsql-bugs |
On Sat, Jun 25, 2022, 08:25 PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:
Bug reference: 17532
Logged by: Jack Christensen
Email address: jack@jackchristensen.com
PostgreSQL version: 14.4
Operating system: MacOS
Description:
A user of the Go driver pgx reported a strange bug
(https://github.com/jackc/pgx/issues/1234). After investigating the issue I
was able to duplicate it in directly in psql. The problem occurs when a
prepared statement has an INSERT ... ON CONFLICT. The statement works the
first 5 times and fails on the 6th time with ERROR: there is no unique or
exclusion constraint matching the ON CONFLICT specification. I would guess
this has to do with the planner choosing a generic or custom plan.
See existing bug 17445 for discussion on this.
In short, you have written a query that probably should always fails and just fails to do so in some instances.
David J.
В списке pgsql-bugs по дате отправления: