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

Re: BUG #1971: Start Transaction is giving Errors !!!

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: "Yogaraj(dot) C" <c_yog(at)rediffmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1971: Start Transaction is giving Errors !!!
Date: 2005-10-18 14:32:55
Message-ID: 20051018143255.GC25442@surnet.cl (view raw or flat)
Thread:
Lists: pgsql-bugs
Yogaraj. C wrote:

>    When I was executing the procedure (with Transaction), postgres will
> producing the following error.
> 
> ERROR:  SPI_prepare() failed on "START TRANSACTION"
> CONTEXT:  PL/pgSQL function "sp_example1" line 4 at SQL statement
> 
>    If anyone know the solution for this, pleas help me.

NOTABUG.  You are not allowed to use transaction commands using SPI,
which in particular means PL/pgSQL.  Use the EXCEPTION clause if you
need a savepoint-like feature.  Note that you can't close the
transaction that started the function.

-- 
Alvaro Herrera                  http://www.amazon.com/gp/registry/DXLWNGRJD34
"El sudor es la mejor cura para un pensamiento enfermo" (Bardia)

In response to

pgsql-bugs by date

Next:From: Peter EisentrautDate: 2005-10-18 14:39:43
Subject: Re: BUG #1974: UTF-8 french postmaster messages corrupted
Previous:From: Michael FuhrDate: 2005-10-18 14:30:04
Subject: Re: BUG #1971: Start Transaction is giving Errors !!!

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