Re: proposal: catch warnings
От | Pavel Stehule |
---|---|
Тема | Re: proposal: catch warnings |
Дата | |
Msg-id | BAY114-F155C1D11A5E72BD2CAFE6AF9BD0@phx.gbl обсуждение исходный текст |
Ответ на | Re: proposal: catch warnings ("Simon Riggs" <simon@2ndquadrant.com>) |
Ответы |
Re: proposal: catch warnings
|
Список | 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 по дате отправления: