From: | Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> |
---|---|
To: | andyterry <andrew(dot)terry(at)centremaps(dot)co(dot)uk> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: commit within a procedure loop - cannot commite with subtransaction |
Date: | 2019-01-21 16:03:32 |
Message-ID: | 87bm4a3sqk.fsf@news-spur.riddles.org.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>>>>> "andyterry" == andyterry <andrew(dot)terry(at)centremaps(dot)co(dot)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)
From | Date | Subject | |
---|---|---|---|
Next Message | Hilbert, Karin | 2019-01-21 17:26:42 | Manage PostgreSQL Database for GITLAB Application? |
Previous Message | Adrian Klaver | 2019-01-21 15:15:05 | Re: commit within a procedure loop - cannot commite with subtransaction |