Re: MERGE vs REPLACE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: MERGE vs REPLACE
Дата
Msg-id 11204.1132177867@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: MERGE vs REPLACE  (daveg <daveg@sonic.net>)
Ответы Re: MERGE vs REPLACE  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
daveg <daveg@sonic.net> writes:
> I agree, but would like to relax the primary key requirement to simply
> a unique index. I can see use cases for unique so long as not null keys,
> so it would be nice if the MERGE operation would work for these. As nulls
> are not "equal" anyway this doesn't seem to do too much violence to the
> semantics.

But a "unique" key doesn't guarantee that there's only one matching row,
so ISTM you're right back to needing a predicate lock if you do that.
        regards, tom lane


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

Предыдущее
От: daveg
Дата:
Сообщение: Re: MERGE vs REPLACE
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Some array semantics issues