Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions
Date
Msg-id CAH2-WzmhL_e0s6vQkGY-b4ETNto0dCaXbV60BVr2GAH4v5c44Q@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions  (Jan de Visser <jan@de-visser.net>)
List pgsql-hackers
On Thu, Jun 22, 2017 at 9:52 AM, Jan de Visser <jan@de-visser.net> wrote:
> I am not quite sure what you're trying to achieve, but are you aware that
> pgsql 9.6 introduced the ON CONFLICT clause, which allows you to do the same
> with a different syntax?
>
> https://www.postgresql.org/docs/9.6/static/sql-insert.html

I don't think it's the same thing. I think we could reasonably have
both SQL MERGE and ON CONFLICT. Or at least, I think that that makes
sense. Teradata already has both (their own custom UPSERT syntax, plus
an implementation of SQL MERGE).

Boxuan Zhai's patch didn't try to do anything special about
concurrency. At the time, this was controversial. However, we now
understand that SQL MERGE really isn't obligated to handle that at all
[1]. Besides, we have ON CONFLICT for those use-cases.

[1] https://wiki.postgresql.org/wiki/UPSERT#MERGE_disadvantages
-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Kang Yuzhe
Date:
Subject: Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions
Next
From: Shubham Barai
Date:
Subject: Re: [HACKERS] GSoC 2017 Proposal for predicate locking in hash index