Skip site navigation (1) Skip section navigation (2)

Re: ROLLBACK, SAVEPOINT, COMMIT throwing error in transaction block.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jaiswal Dhaval Sudhirkumar" <JaiswalDS(at)microland(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: ROLLBACK, SAVEPOINT, COMMIT throwing error in transaction block.
Date: 2011-02-18 14:48:26
Message-ID: 20855.1298040506@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Jaiswal Dhaval Sudhirkumar" <JaiswalDS(at)microland(dot)com> writes:
> ERROR: SPI_execute_plan_with_paramlist failed executing query "SAVEPOINT my_savepoint": SPI_ERROR_TRANSACTION

This is not a bug.  It's an extremely well-documented limitation that
you can't use those commands in a plpgsql function.

You can get the effect of a savepoint using a BEGIN/EXCEPTION block.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: Piergiorgio BuongiovanniDate: 2011-02-18 15:47:24
Subject: BUG #5894: Rules' behaviour when SERIAL data types are used
Previous:From: Euler Taveira de OliveiraDate: 2011-02-18 13:26:01
Subject: Re: BUG #5878: BTREE_BUILD_STATS causes 'make check' to fail

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group