Re: Question about savepoint level?

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Richard Guo <guofenglinux(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Question about savepoint level?
Date: 2022-10-24 11:03:18
Message-ID: 20221024110318.rckt7lfj55rkalet@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2022-Oct-24, Japin Li wrote:

> On Mon, 24 Oct 2022 at 17:56, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Melih Mutlu 2022-10-24 11:13:06 Re: Mingw task for Cirrus CI
Previous Message Alvaro Herrera 2022-10-24 10:59:06 Re: Some comments that should've covered MERGE