Re: [HACKERS] Packages: Again - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: [HACKERS] Packages: Again
Date
Msg-id CAM3SWZT9QL+x4MKtqA8t1yN4WPp7U-QKqhs1zuNmMYfLNSkyxQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Packages: Again  (Serge Rielau <serge@rielau.com>)
List pgsql-hackers
On Fri, Jan 13, 2017 at 8:56 PM, Serge Rielau <serge@rielau.com> wrote:
>> That's total nonsense.
>>
>> MERGE isn't UPSERT….
>
> Peter,
> you are misreading what I wrote. I did not allege that PostgreSQL did the wrong thing. And you are essentially
confirmingthat there was debate and MERGE deemed to be not what was wanted. So PG, with reason, went with something not
inthe standard. 
>
> That is precisely my point!

I'm sorry for being so blunt. That was unnecessary. I thought that you
were citing that as a negative counterexample, rather than a neutral
or positive one.

Still, it's true that MERGE has very little overlap with UPSERT, both
as specified by the standard, and as implemented in practice by both
SQL Server and Oracle. The Oracle docs introduce MERGE with a
statement that is something along the lines of "MERGE is a way to
combine INSERT, UPDATE, and DELETE into one convenient DML statement".
MERGE is most compelling when performing bulk loading. That being the
case, in my mind MERGE remains something that we really haven't turned
our back on at all.

--
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Mithun Cy
Date:
Subject: Re: [HACKERS] pageinspect: Hash index support
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] BUG: pg_stat_statements query normalization issues with combined queries