Re: MERGE vs REPLACE - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: MERGE vs REPLACE
Date
Msg-id 43828E6C.60406@seznam.cz
Whole thread Raw
In response to Re: MERGE vs REPLACE  ("Jim C. Nasby" <jnasby@pervasive.com>)
Responses Re: MERGE vs REPLACE  (Jaime Casanova <systemguards@gmail.com>)
Re: MERGE vs REPLACE  (Martijn van Oosterhout <kleptog@svana.org>)
List 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 by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Are NULLs in Arrays compressed?
Next
From: mark@mark.mielke.cc
Date:
Subject: Re: Are NULLs in Arrays compressed?