public inbox for [email protected]
help / color / mirror / Atom feedFrom: Christophe Pettus <[email protected]>
To: Kevin Stephenson <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000
Date: Sat, 22 Mar 2025 09:01:51 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <IA0PR19MB721723603709836EE5D0B17E8FDA2@IA0PR19MB7217.namprd19.prod.outlook.com>
References: <IA0PR19MB721723603709836EE5D0B17E8FDA2@IA0PR19MB7217.namprd19.prod.outlook.com>
Hello,
> On Mar 22, 2025, at 08:38, Kevin Stephenson <[email protected]> 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 so raises the error you saw. This includes procedures that are called from within an exception block.
view thread (6+ messages) latest in thread
reply
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Nested Stored Procedures - ERROR: invalid transaction termination 2D000
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox