Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 485F31337B4F for ; Fri, 18 Feb 2011 10:48:41 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 83903-06 for ; Fri, 18 Feb 2011 14:48:33 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id B0EBD1337B93 for ; Fri, 18 Feb 2011 10:48:32 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p1IEmQNq020856; Fri, 18 Feb 2011 09:48:26 -0500 (EST) To: "Jaiswal Dhaval Sudhirkumar" cc: pgsql-bugs@postgresql.org Subject: Re: ROLLBACK, SAVEPOINT, COMMIT throwing error in transaction block. In-reply-to: References: Comments: In-reply-to "Jaiswal Dhaval Sudhirkumar" message dated "Fri, 18 Feb 2011 14:33:43 +0530" Date: Fri, 18 Feb 2011 09:48:26 -0500 Message-ID: <20855.1298040506@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/162 X-Sequence-Number: 29434 "Jaiswal Dhaval Sudhirkumar" 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