Search Postgresql Archives

Re: commit within a procedure loop - cannot commite with subtransaction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "andyterry" == andyterry  <andrew.terry@xxxxxxxxxxxxxxxx> 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)




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux