Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}
Дата
Msg-id 54359EB7.5000300@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
On 08/10/14 11:28, Peter Geoghegan wrote:
> On Wed, Oct 8, 2014 at 1:36 AM, Marti Raudsepp <marti@juffo.org> wrote:
>> But the
>> MERGE syntax, to me, strongly implies that insertion doesn't begin
>> before determining whether a conflict exists or not.
>
> I think you're right. Another strike against the MERGE syntax, then,
> since as I said we cannot even know what to check prior to having
> before row insert triggers fire.
>

True, but to me it also seems to be strike against using INSERT for this 
as I don't really see how you can make triggers work in a sane way if 
the UPSERT is implemented as part of INSERT (at least I haven't seen any 
proposal that I would consider sane from the user point of view).

--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: UPSERT wiki page, and SQL MERGE syntax
Следующее
От: Kevin Grittner
Дата:
Сообщение: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}