From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jaiswal Dhaval Sudhirkumar <JaiswalDS@microland.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: ROLLBACK, SAVEPOINT, COMMIT throwing error in transaction block.
Date: Fri, 18 Feb 2011 09:48:26 -0500
Message-ID: <20855.1298040506@sss.pgh.pa.us> (raw)
In-Reply-To: <F260108AB230D44CBAA660B47CC4110A06EB9B58@blrisbe01.MLCORP.NET>
References: <F260108AB230D44CBAA660B47CC4110A06EB9B58@blrisbe01.MLCORP.NET>
"Jaiswal Dhaval Sudhirkumar" <JaiswalDS@microland.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, JaiswalDS@microland.com
Subject: Re: ROLLBACK, SAVEPOINT, COMMIT throwing error in transaction block.
In-Reply-To: <20855.1298040506@sss.pgh.pa.us>
References: <F260108AB230D44CBAA660B47CC4110A06EB9B58@blrisbe01.MLCORP.NET> <20855.1298040506@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox