On 2022-Oct-24, Japin Li wrote:
> On Mon, 24 Oct 2022 at 17:56, Alvaro Herrera <alvherre@alvh.no-ip.org> wrote:
> > Now that we have transaction-controlling procedures, I think the next
> > step is to add the SQL-standard feature that allows savepoint level
> > control for them, which would make the savepointLevel no longer dead
> > code.
>
> So the savepoint level is used for CREATE PROCEDURE ... OLD/NEW SAVEPOINT LEVEL
> syntax [1], right?
>
> [1] https://www.ibm.com/docs/en/db2/10.1.0?topic=statements-create-procedure-sql
Yeah, that's what I understand. The default behavior is the current
behavior (OLD SAVEPOINT LEVEL). In a procedure that specifies NEW
SAVEPOINT LEVEL trying to rollback a savepoint that was defined before
the procedure was called is an error, which sounds a useful protection.
--
Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/
"El sentido de las cosas no viene de las cosas, sino de
las inteligencias que las aplican a sus problemas diarios
en busca del progreso." (Ernesto Hernández-Novich)