Re: BUG #14132: ON CONFLICT not inferring unique index with bigints
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #14132: ON CONFLICT not inferring unique index with bigints |
| Дата | |
| Msg-id | 15186.1462977205@sss.pgh.pa.us обсуждение |
| Ответ на | BUG #14132: ON CONFLICT not inferring unique index with bigints (fiercetuba@protonmail.com) |
| Ответы |
Re: BUG #14132: ON CONFLICT not inferring unique index with bigints
|
| Список | pgsql-bugs |
fiercetuba@protonmail.com writes:
> This fails, but change bigint to int and it works fine.
Looks like somebody forgot to run the ON CONFLICT list through
expression preprocessing. Unfortunately it's too late to get
this fixed in tomorrow's releases :-(
As a workaround for this particular example, you could write either
INSERT INTO testtable(b, c)
VALUES (1, 2)
ON CONFLICT ((COALESCE(b, '0'::int8)), (COALESCE(c, '0'::int8))) DO NOTHING;
INSERT INTO testtable(b, c)
VALUES (1, 2)
ON CONFLICT ((COALESCE(b, '0')), (COALESCE(c, '0'))) DO NOTHING;
but in general there might not be any such easy solution.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера