Re: MERGE vs REPLACE

From: Petr Jelinek <pjmodos(at)seznam(dot)cz>
To: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: MERGE vs REPLACE
Date: 2005-11-22 03:20:12
Message-ID: 43828E6C.60406@seznam.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message mark 2005-11-22 03:24:16 Re: Are NULLs in Arrays compressed?
Previous Message Michael Fuhr 2005-11-22 03:12:10 Re: Are NULLs in Arrays compressed?