From: | Dominique Devienne <ddevienne(at)gmail(dot)com> |
---|---|
To: | Erik Wienhold <ewie(at)ewie(dot)name> |
Cc: | Lorusso Domenico <domenico(dot)l76(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: rollback to savepoint issue |
Date: | 2023-09-04 14:32:35 |
Message-ID: | CAFCRh-_zL2oqjqu-rG-LZps1vTk9uOtWte3daQf7tPH=j2tJFw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Sep 4, 2023 at 4:22 PM Dominique Devienne <ddevienne(at)gmail(dot)com>
wrote:
> On Mon, Sep 4, 2023 at 3:47 PM Erik Wienhold <ewie(at)ewie(dot)name> wrote:
>
>> On 04/09/2023 11:51 CEST Lorusso Domenico <domenico(dot)l76(at)gmail(dot)com> wrote:
>> Transaction control is not possible in functions. Only in procedures
>> (CALL)
>> and DO blocks.
>>
>> > ERROR: syntax error at or near "to"
>> > LINE 41: rollback to savepoint deleteAttribute;
>>
>> Use BEGIN ... EXCEPTION ... END instead of manual savepoints. [1]
>>
>> [1]
>> https://www.postgresql.org/docs/current/plpgsql-porting.html#PLPGSQL-PORTING-EXCEPTIONS
>
>
> Hi Erik. And experts at large. What's the underlying mechanism though? An
> implicit SAVEPOINT?
> [...] Thanks for any insights. --DD
>
(I guess I should have done a little more research before posting...)
I think Laurenz' old post answers most of my question. I probably read it
before too!
Different devs work on different parts of our (large) system / apps, and we
don't all use
SAVEPOINTs. I don't, but one of my colleagues does. Thus my (hasty)
questions above.
Sorry for the noise. --DD
[1]:
https://www.cybertec-postgresql.com/en/subtransactions-and-performance-in-postgresql/
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2023-09-04 14:56:58 | Re: rollback to savepoint issue |
Previous Message | Adam Lee | 2023-09-04 14:31:58 | Re: [EXTERNAL] Oracle FDW version |