Re: UPSERT strange behavior

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: UPSERT strange behavior
Дата
Msg-id CAM3SWZSB8RGrkYRCV5ahrOTOktUjnjQcKQeYKCK9x7W9-wWa1w@mail.gmail.com
обсуждение исходный текст
Ответ на UPSERT strange behavior  (Ivan Frolkov <ifrol2001@mail.ru>)
Ответы Re: UPSERT strange behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Aug 25, 2016 at 7:12 AM, Ivan Frolkov <ifrol2001@mail.ru> wrote:
> So, if we have primary key and unique constraint on a table then upsert will
> not work as would expected.

Why is this unexpected?

You only take the alternative path (UPDATE) in the event of a would-be
duplicate violation. You can't upsert while using more than one index
as an arbiter index. This is true unless they're more or less
equivalent, in which case multiple arbiter indexes can be inferred,
but that clearly doesn't apply here.


-- 
Peter Geoghegan



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: increasing the default WAL segment size
Следующее
От: Robert Haas
Дата:
Сообщение: Re: increasing the default WAL segment size