Re: MERGE vs REPLACE

Поиск
Список
Период
Сортировка
От daveg
Тема Re: MERGE vs REPLACE
Дата
Msg-id 20051116213128.GK22209@sonic.net
обсуждение исходный текст
Ответ на Re: MERGE vs REPLACE  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: MERGE vs REPLACE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Nov 16, 2005 at 09:49:28AM -0500, Tom Lane wrote:
> I think we should do REPLACE-like functionality that simply fails if the
> match condition isn't equality on a primary key.  If we can use SQL-spec
> MERGE syntax for this, that's fine, but let's not think in terms of
> silently changing to a stronger table lock and a much slower
> implementation when the condition isn't a primary key.  That's a whole

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.

-dg

-- 
David Gould                      daveg@sonic.net
If simplicity worked, the world would be overrun with insects.


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

Предыдущее
От: Rick Gigger
Дата:
Сообщение: Re: MERGE vs REPLACE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: MERGE vs REPLACE