Re: MERGE Specification - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: MERGE Specification
Date
Msg-id 1208827710.4259.979.camel@ebony.site
Whole thread Raw
In response to Re: MERGE Specification  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: MERGE Specification  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: MERGE Specification  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
On Mon, 2008-04-21 at 20:28 -0400, Tom Lane wrote:
> Simon Riggs <simon@2ndquadrant.com> writes:
> > On Mon, 2008-04-21 at 16:38 -0400, A.M. wrote:
> >> "MERGE will not invoke Rules." Does this imply that MERGE cannot be  
> >> used on views or that the resulting INSERTs or UPDATEs do not work on  
> >> views?
> 
> > Yes, that's right. Just like COPY.
> 
> I find this to be pretty ugly.  COPY is a special case because
> (a) it is a utility statement not a plannable one, and (b) its only
> reason to exist is to transfer data as fast as possible, so bypassing
> rules isn't an unreasonable restriction.  MERGE has neither of those
> properties, and thus arguing that it can or should be like COPY is an
> entirely unconvincing proposition. 

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.

--  Simon Riggs 2ndQuadrant  http://www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: MERGE Specification
Next
From: Alvaro Herrera
Date:
Subject: Re: MERGE Specification