Re: proposal: catch warnings - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal: catch warnings
Date
Msg-id BAY114-F155C1D11A5E72BD2CAFE6AF9BD0@phx.gbl
Whole thread Raw
In response to Re: proposal: catch warnings  ("Simon Riggs" <simon@2ndquadrant.com>)
Responses Re: proposal: catch warnings
List pgsql-hackers
>
>On Sun, 2007-01-07 at 09:59 +0100, Pavel Stehule wrote:
>
> > PostgreSQL allow only catch exception (elevel ERROR). SQL/PSM requires 
>that
> > warnings are catchable too. Simply solution's is adding one callback  to
> > error's processing of errors on level WARNING.
>
>Exceptions are run within their own subtransaction, so the exception
>handling code runs separately.
>
>Does the PSM warning error handler run in the same transaction or a
>separate subtransaction? Can transaction execution continue afterwards?
>

It's depend. Continue and exit warning handlers run in the same transaction, 
undo handler has separate subtransaction. It works well. For patterns used 
in SQL/PSM is important fast continue handler for SQLSTATE '02000' (not 
found). Transactions are controlled in plpgpsm code (like plpgsql). This 
patch allows detecting signalled warning (after processing and finishing any 
statement).

Pavel Stehule

_________________________________________________________________
Find sales, coupons, and free shipping, all in one place! �MSN Shopping 
Sales & Deals 
http://shopping.msn.com/content/shp/?ctid=198,ptnrid=176,ptnrdata=200639



pgsql-hackers by date:

Previous
From: "Simon Riggs"
Date:
Subject: Re: proposal: catch warnings
Next
From: Shane Ambler
Date:
Subject: Erronous sort used in query plan