Re: MERGE Specification

Simon Riggs <simon@2ndquadrant.com>

From: Simon Riggs <simon@2ndQuadrant.com>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Boxuan Zhai <bxzhai2010@gmail.com>, Merlin Moncure <mmoncure@gmail.com>, pgsql-hackers@postgresql.org
Date: 2010-08-06T07:41:44Z
Lists: pgsql-hackers
On Fri, 2010-08-06 at 10:28 +0300, Heikki Linnakangas wrote:

> > SQL:2011 makes no mention of how MERGE should react to statement level
> > triggers. MERGE is not a trigger action even. Given considerable
> > confusion in this area, IMHO we should just say the MERGE does not call
> > statement triggers at all, of any kind.
> 
> IMO the UPDATE/DELETE/INSERT actions should fire the respective 
> statement level triggers, but the MERGE itself should not.

When, and how?

If an UPDATE is mentioned 5 times, do we call the trigger 5 times? What
happens if none of the UPDATEs are ever executed? 

Best explain exactly what you mean.

-- 
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Development, 24x7 Support, Training and Services