Re: Duplicate key error

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Duplicate key error
Дата
Msg-id CAH2-Wz=bSrxrEF_xsz+jLgiqQqE=n2_PZPe-GzRsSz6k6-Vr9A@mail.gmail.com
обсуждение исходный текст
Ответ на Duplicate key error  (yudhi s <learnerdatabase99@gmail.com>)
Ответы Re: Duplicate key error
Список pgsql-general
On Mon, Nov 11, 2024 at 12:41 AM yudhi s <learnerdatabase99@gmail.com> wrote:
> So it means it will ensure no duplication happens for ID values, but still we are seeing "duplicate key" error. So
whatis the possible reason here or are we encountering any buggy behaviour here? 

MERGE doesn't actually make any promises about not getting unique
violations. Only ON CONFLICT DO UPDATE (and ON CONFLICT DO NOTHING)
make such a promise. That's the main reason why Postgres supports
both.

--
Peter Geoghegan



В списке pgsql-general по дате отправления: