Re: MERGE vs REPLACE

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: MERGE vs REPLACE
Дата
Msg-id 200511160022.jAG0MiC12043@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: MERGE vs REPLACE  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
Simon Riggs wrote:
> I've been looking at ways of doing INSERT then UPDATE, but it doesn't
> seem very easy to avoid unique index violations in that case. So doing
> the UPDATE first then INSERTs later seems like the way to go.

INSERT has to be first to avoid a race condition (see my previous
emails).  We just need a way to get a unique index violation and
continue with the UPDATE.  We have savepoints now so it certainly seems
possible.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


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

Предыдущее
От: Trent Shipley
Дата:
Сообщение: Re: [ADMIN] Major Problem, need help! Can't run our website!
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: MERGE vs REPLACE