Re: MERGE vs REPLACE

Поиск
Список
Период
Сортировка
От Petr Jelinek
Тема Re: MERGE vs REPLACE
Дата
Msg-id 43828E6C.60406@seznam.cz
обсуждение исходный текст
Ответ на Re: MERGE vs REPLACE  ("Jim C. Nasby" <jnasby@pervasive.com>)
Ответы Re: MERGE vs REPLACE  (Jaime Casanova <systemguards@gmail.com>)
Re: MERGE vs REPLACE  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Jim C. Nasby wrote:
> On Thu, Nov 17, 2005 at 10:15:30AM -0500, Stephen Frost wrote:
> 
>>I don't think MERGE can really be made to be both though, in which case
>>it should really be the SQL2003 MERGE and we can make REPLACE/INSERT ON
>>DUPLICATE UPDATE something else.  Perhaps a special form of MERGE where
>>you know it's going to be doing that locking.  I really don't like the
>>idea of making the SQL2003 version of MERGE be the MERGE special case
>>(by requiring someone to take a table lock ahead of time or do something
>>else odd).
> 
> 
> Anyone know off-hand what the big 3 do? If the industry consensus is
> that merge should actually be REPLACE/INSERT ON DUPLICATE UPDATE then
> it's probably better to follow that lead.

It was already said here that oracle and db2 both use MERGE, dunno about 
mssql.

And yes merge CAN be used to do REPLACE (oracle uses their dummy table 
for this, we can use the fact that FROM clause isn't required in postgres).

-- 
Regards
Petr Jelinek (PJMODOS)


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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Are NULLs in Arrays compressed?
Следующее
От: mark@mark.mielke.cc
Дата:
Сообщение: Re: Are NULLs in Arrays compressed?