Re: commit within a procedure loop - cannot commite with subtransaction - Mailing list pgsql-general

From Andrew Gierth
Subject Re: commit within a procedure loop - cannot commite with subtransaction
Date
Msg-id 87bm4a3sqk.fsf@news-spur.riddles.org.uk
Whole thread Raw
In response to commit within a procedure loop - cannot commite with subtransaction  (andyterry <andrew.terry@centremaps.co.uk>)
Responses Re: commit within a procedure loop - cannot commite withsubtransaction  (andyterry <andrew.terry@centremaps.co.uk>)
List pgsql-general
>>>>> "andyterry" == andyterry  <andrew.terry@centremaps.co.uk> writes:

 andyterry> Hi,

 andyterry> Using a procedure for the first time to run some processing
 andyterry> for each row in a table, generating output to a target
 andyterry> table. The following works without COMMIT the example below
 andyterry> gives:

 andyterry> INFO: Error Name:cannot commit while a subtransaction is active
 andyterry> INFO: Error State:2D000

What client are you using to execute this? Some clients may insert
SAVEPOINT statements (which create subtransactions) behind your back
(e.g. psql with \set ON_ERROR_ROLLBACK does this) in order to recover
from errors without aborting the whole transaction.

(turn on log_statement=all in your config, or for the user you're
executing this as, and look for the command in the server log)

-- 
Andrew (irc:RhodiumToad)


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: commit within a procedure loop - cannot commite withsubtransaction
Next
From: "Hilbert, Karin"
Date:
Subject: Manage PostgreSQL Database for GITLAB Application?