Re: MERGE SQL Statement for PG11

From: srielau <serge(at)rielau(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: MERGE SQL Statement for PG11
Date: 2017-10-27 21:13:27
Message-ID: 1509138807748-0.post@n3.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Simon,

Nice writeup.

While the standard may not require a unique index for the ON clause I have
never seen a MERGE statement that did not have this property. So IMHO this
is a reasonable restrictions.

In fact I have only ever seen two flavors of usage:
* Single row source (most often simply a VALUES clause) in OLTP
In that case there was lots of concurrency
* Massive source which affects a significant portion of the target table in
DW.
In this case there were no concurrent MERGEs

I believe support for returning rows at a later stage would prove to be very
powerful, especially in combination with chaining MERGE statements in CTEs.
To do that would require language extensions to pass the coloring of the
source row through, especially for rows that fell into "do nothing".

--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-10-27 21:14:28 Re: [HACKERS] git down
Previous Message Erik Rijkers 2017-10-27 20:51:27 git down