From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [subxacts] Aborting a function |
Date: | 2004-07-10 05:16:22 |
Message-ID: | 3130.1089436582@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-07-10 05:25:49 | Re: User Quota Implementation |
Previous Message | Christopher Kings-Lynne | 2004-07-10 04:39:52 | Re: [PATCHES] Fixes for pg_dump and ownership/acl problems |