Re: MERGE Specification - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: MERGE Specification
Date
Msg-id 4C5BB99D.5040404@enterprisedb.com
Whole thread Raw
In response to Re: MERGE Specification  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: MERGE Specification  (Simon Riggs <simon@2ndQuadrant.com>)
Re: MERGE Specification  (Simon Riggs <simon@2ndQuadrant.com>)
Re: MERGE Specification  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
On 06/08/10 10:12, Simon Riggs wrote:
> So DO NOTHING is the default and implies silently ignoring rows. RAISE
> ERROR is the opposite.
>
> Coding for those seems very easy, its just a question of "should we do
> it?". DB2 has it; SQL:2008 does not. But then SQL:2008 followed the DB2
> introduction of AND clauses, and SQL:2011 has so far followed the DB2
> introduction of DELETE action also.

I see neither DO NOTHING or RAISE ERROR in the documentation of DB2, 
Oracle, or MSSQL server.

> Given that Peter is now attending SQL Standards meetings, I would
> suggest we leave out my suggestion above, for now. We have time to raise
> this at standards meetings and influence the outcome and then follow
> later.

Ok, fair enough.

> 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.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: pgsql-hackers@news.hub.org
Date:
Subject: pgsql-hackers@news.hub.org 21% OFF on Pfizer!
Next
From: Heikki Linnakangas
Date:
Subject: Re: PL/pgSQL EXECUTE '..' USING with unknown