Re: rollback to savepoint issue

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: rollback to savepoint issue
Дата
Msg-id 1165806895.176202.1693840943412@office.mailbox.org
обсуждение исходный текст
Ответ на rollback to savepoint issue  (Lorusso Domenico <domenico.l76@gmail.com>)
Ответы Re: rollback to savepoint issue  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: rollback to savepoint issue
Следующее
От: Lorusso Domenico
Дата:
Сообщение: Array vs Temporary table vs Normal Table + truncate at end