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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?


Reply via email to