Re: [subxacts] Aborting a function
| От | Tom Lane |
|---|---|
| Тема | Re: [subxacts] Aborting a function |
| Дата | |
| Msg-id | 3130.1089436582@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | [subxacts] Aborting a function (Alvaro Herrera <alvherre@dcc.uchile.cl>) |
| Ответы |
Re: [subxacts] Aborting a function
|
| Список | pgsql-hackers |
Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> (We could talk about exception support in plpgsql or other language
> handlers but I don't think this is going to happen for 7.5.)
Au contraire ... I think it *must* happen, and indeed that
subtransaction support in plpgsql is not different from exceptions.
Per Honza Pazdziora's recent post:
>> The syntax of handling exceptions is (in PL/SQL):
>>
>> BEGIN
>> some code, for example a bunch of SQL commands;
>> EXCEPTION
>> WHEN nameofexception THEN
>> handle the exception, maybe ROLLBACK;
>> END;
This should be exactly how you invoke a subtransaction in plpgsql.
Anything else will be too messy to contemplate...
regards, tom lane
В списке pgsql-hackers по дате отправления: