From: Erik Wienhold <ewie@ewie.name>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: rollback to savepoint issue
Date: Mon, 4 Sep 2023 17:22:23 +0200 (CEST)
Message-ID: <1165806895.176202.1693840943412@office.mailbox.org> (raw)
In-Reply-To: <CAKFQuwb9yik6ocVi2_uVb1k_K0gtEKV07EFtoG0e9Rs77rdhCw@mail.gmail.com>
References: <CAJMpnG7DAcz4ckE_GGN4VkjaJvzVrdwCYwjH+ocLnVVYvb-fcQ@mail.gmail.com>
<1341766181.156278.1693831501720@office.mailbox.org>
<CAKFQuwb9yik6ocVi2_uVb1k_K0gtEKV07EFtoG0e9Rs77rdhCw@mail.gmail.com>
On 04/09/2023 16:56 CEST David G. Johnston <david.g.johnston@gmail.com> wrote:
> On Monday, September 4, 2023, Erik Wienhold <ewie@ewie.name> wrote:
>
> > On 04/09/2023 11:51 CEST Lorusso Domenico <domenico.l76@gmail.com> wrote:
> >
> > > The original code in embedded in a function, but the problem is the same:
> >
> > Transaction control is not possible in functions. Only in procedures (CALL)
> > and DO blocks.
>
> Then explain why the original savepoint command wasn’t a syntax, or runtime,
> error?
I don't need to because CREATE {FUNCTION | PROCEDURE} already fails because of
ROLLBACK TO SAVEPOINT. And without a function to execute there can't be any
runtime error because of SAVEPOINT. My point was about transaction control in
plpgsql in general.
> Plus, the error is syntax, usually when you try something that exists
> but is disallowed the system gives you some kind of invalid state exception
> at runtime,
--
Erik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ewie@ewie.name, david.g.johnston@gmail.com
Subject: Re: rollback to savepoint issue
In-Reply-To: <1165806895.176202.1693840943412@office.mailbox.org>
References: <CAJMpnG7DAcz4ckE_GGN4VkjaJvzVrdwCYwjH+ocLnVVYvb-fcQ@mail.gmail.com> <1341766181.156278.1693831501720@office.mailbox.org> <CAKFQuwb9yik6ocVi2_uVb1k_K0gtEKV07EFtoG0e9Rs77rdhCw@mail.gmail.com> <1165806895.176202.1693840943412@office.mailbox.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox