Re: MERGE Specification

Greg Stark <stark@enterprisedb.com>

From: Gregory Stark <stark@enterprisedb.com>
To: "Simon Riggs" <simon@2ndquadrant.com>
Cc: "Tom Lane" <tgl@sss.pgh.pa.us>, "A.M." <agentm@themactionfaction.com>, <pgsql-hackers@postgresql.org>
Date: 2008-04-22T02:27:12Z
Lists: pgsql-hackers
"Simon Riggs" <simon@2ndquadrant.com> writes:

> Unrelated to rule processing, you did read the bit about MERGE and race
> conditions? ISTM that MERGE as it stands isn't very useful for anything
> other than large data loads since its going to cause problems if used
> concurrently.

If there are race conditions what advantage does it offer over writing plpgsql
or client code to do it?

I thought the whole advantage of having a built-in command is that it could do
the kind of locking our unique constraints do to avoid race conditions.


-- 
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com
  Ask me about EnterpriseDB's On-Demand Production Tuning