Re: INSERT...ON DUPLICATE KEY IGNORE

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: INSERT...ON DUPLICATE KEY IGNORE
Дата
Msg-id CAM3SWZSYWprR_ezYS3cZi22bZNFf8Z=CVr_qLK40dt1++CwkKA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: INSERT...ON DUPLICATE KEY IGNORE  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: INSERT...ON DUPLICATE KEY IGNORE  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
On Mon, Sep 2, 2013 at 6:25 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
> It'll be yet another way for people to get upsert wrong, of course.
> They'll use a wCTE with RETURNING REJECTS to do an UPDATE of the rejects
> w/o locking the table against writes first. Documenting this pitfall
> should be enough, though.

My preferred solution is to actually provide a variant to lock the
rows implicated in the would-be unique constraint violation. Obviously
that's a harder problem to solve.

-- 
Peter Geoghegan



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

Предыдущее
От: Fabrízio de Royes Mello
Дата:
Сообщение: Re: [GENERAL] currval and DISCARD ALL
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: ENABLE/DISABLE CONSTRAINT NAME