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

Re: BUG #5500: SPI_execute_plan_with_paramlist SPI_ERROR_TRANSACTION with savepoint

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Robert Walker <robwalker01(at)speedymail(dot)org>
Cc: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #5500: SPI_execute_plan_with_paramlist SPI_ERROR_TRANSACTION with savepoint
Date: 2010-06-11 23:38:14
Message-ID: 1276299397-sup-4840@alvh.no-ip.org (view raw or flat)
Thread:
Lists: pgsql-bugs
Excerpts from Robert Walker's message of vie jun 11 14:49:03 -0400 2010:

> SPI_execute_plan_with_paramlist seems to be newly introduced into 9.0 beta
> that is causing an error in pl/pgsql when attempting to create a savepoint.
> This did not happen when using version 8.4 (which I assume was not using
> SPI_execute_plan_with_paramlist), so I believe this is a regression.
> 
> The specific format of the error is:
> 
> ERROR: SPI_execute_plan_with_paramlist failed executing query "SAVEPOINT
> savepoint_name": SPI_ERROR_TRANSACTION

If it fails to fail on 8.4, that's a bug -- it is *supposed* not to
work.  If you want to use savepoints in plpgsql you need to use
EXCEPTION blocks.  Can you provide a working example in 8.4?

-- 
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

pgsql-bugs by date

Next:From: Dave JarvisDate: 2010-06-12 06:42:36
Subject: BUG #5501: PostgreSQL JDBC Driver has inappropriate import
Previous:From: Tom LaneDate: 2010-06-11 21:35:13
Subject: Re: BUG #5500: SPI_execute_plan_with_paramlist SPI_ERROR_TRANSACTION with savepoint

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