Re: ask for review of MERGE

Поиск
Список
Период
Сортировка
От Greg Smith
Тема Re: ask for review of MERGE
Дата
Msg-id 4CC4A780.10301@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: ask for review of MERGE  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: ask for review of MERGE  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
Robert Haas wrote:
> Well, there's no guarantee that any index at all exists on the target
> table, so any solution based on index locks can't be fully general.
>   

Sure, but in the most common use case I think we're targeting at first, 
no indexes means there's also no unique constraints either.  I don't 
think people can reasonable expect to MERGE or anything else to 
guarantee they won't accidentally create two rows that conflict via the 
terms of some non-database enforced key.

I am too brain-dead this particular Sunday to think of exactly how to 
deal with the 3-tuple case you described, except to say that I think 
it's OK for complicated situations to give up and throw a serialization 
error.  I'm already collecting a list of pathological tests and will try 
to add something based on your problem case, then see what we can do 
with it later.

-- 
Greg Smith, 2ndQuadrant US greg@2ndQuadrant.com Baltimore, MD
PostgreSQL Training, Services and Support  www.2ndQuadrant.us




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

Предыдущее
От: Jan Urbański
Дата:
Сообщение: why does plperl cache functions using just a bool for is_trigger
Следующее
От: Jeff Davis
Дата:
Сообщение: Range Types, discrete and/or continuous