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