On Mon, Sep 4, 2023 at 4:22 PM Dominique Devienne <ddevie...@gmail.com>
wrote:

> On Mon, Sep 4, 2023 at 3:47 PM Erik Wienhold <e...@ewie.name> wrote:
>
>> On 04/09/2023 11:51 CEST Lorusso Domenico <domenico....@gmail.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/

Reply via email to