Re: [HACKERS] MERGE SQL Statement for PG11 - Mailing list pgsql-hackers

From srielau
Subject Re: [HACKERS] MERGE SQL Statement for PG11
Date
Msg-id 1509138807748-0.post@n3.nabble.com
Whole thread Raw
In response to Re: [HACKERS] MERGE SQL Statement for PG11  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] MERGE SQL Statement for PG11
Re: [HACKERS] MERGE SQL Statement for PG11
List 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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Erik Rijkers
Date:
Subject: [HACKERS] git down
Next
From: Thomas Munro
Date:
Subject: Re: [HACKERS] Causal reads take II