Search Postgresql Archives

Re: rollback to savepoint issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 4, 2023 at 4:22 PM Dominique Devienne <ddevienne@xxxxxxxxx> wrote:
On Mon, Sep 4, 2023 at 3:47 PM Erik Wienhold <ewie@xxxxxxxxx> wrote:
On 04/09/2023 11:51 CEST Lorusso Domenico <domenico.l76@xxxxxxxxx> 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/ 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux