From: | Erik Wienhold <ewie(at)ewie(dot)name> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
Cc: | "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: rollback to savepoint issue |
Date: | 2023-09-04 15:22:23 |
Message-ID: | 1165806895.176202.1693840943412@office.mailbox.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 04/09/2023 16:56 CEST David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:
> On Monday, September 4, 2023, Erik Wienhold <ewie(at)ewie(dot)name> wrote:
>
> > On 04/09/2023 11:51 CEST Lorusso Domenico <domenico(dot)l76(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Lorusso Domenico | 2023-09-04 16:42:19 | Array vs Temporary table vs Normal Table + truncate at end |
Previous Message | Adrian Klaver | 2023-09-04 15:12:50 | Re: rollback to savepoint issue |