Re: Question about savepoint level? - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Question about savepoint level?
Date
Msg-id 20221024110318.rckt7lfj55rkalet@alvherre.pgsql
Whole thread Raw
In response to Re: Question about savepoint level?  (Japin Li <japinli@hotmail.com>)
List pgsql-hackers
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)



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Some comments that should've covered MERGE
Next
From: Melih Mutlu
Date:
Subject: Re: Mingw task for Cirrus CI