The following documentation comment has been logged on the website: Page: https://www.postgresql.org/docs/16/plpgsql-transactions.html Description:
https://www.postgresql.org/docs/current/plpgsql-transactions.html In this section nothing mentioned that a savepoint (a subtransaction) will not work inside plpgsql. Savepoint command is ended with "ERROR: unsupported transaction command in PL/pgSQL". Also need to say, that "begin end" block with "exception" handler will implicitly save and release savepoints.