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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-bugs by date

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