Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000
Дата
Msg-id 12B83964-7B3B-4345-9952-F8FE61727CB5@thebuild.com
обсуждение исходный текст
Ответ на Nested Stored Procedures - ERROR: invalid transaction termination 2D000  (Kevin Stephenson <kjs714@hotmail.com>)
Ответы Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000
Список pgsql-general
Hello,

> On Mar 22, 2025, at 08:38, Kevin Stephenson <kjs714@hotmail.com> wrote:
>     • When a top-level stored procedure is called it implicitly creates a TX if there is no current TX.
>     • When a BEGIN/EXCEPTION block is used it implicitly creates a subTX for that block.

These statements are correct.

>     • When a nested stored procedure is called it implicitly creates a subTX for that invocation.

This one is not.  (Although the behavior you are looking for may not depend on that.)

A procedure cannot issue top-level transaction control statements from within an exception block, and attempting to do
soraises the error you saw.  This includes procedures that are called from within an exception block. 


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