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) ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match