Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 49AEA63283A for ; Wed, 26 May 2010 13:14:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 66427-10 for ; Wed, 26 May 2010 16:14:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id A77756325EF for ; Wed, 26 May 2010 13:14:02 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Wed, 26 May 2010 11:14:02 -0500 Message-Id: <4BFD02770200002500031AFF@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Wed, 26 May 2010 11:13:59 -0500 From: "Kevin Grittner" To: "Ravi Katkar" , "'pgsql-admin@postgresql.org'" Subject: Re: Transaction with in function References: <46AC8D44F3AE1F4888F137837D0DF635072561999F@INHYWEXMB2.infor.com> In-Reply-To: <46AC8D44F3AE1F4888F137837D0DF635072561999F@INHYWEXMB2.infor.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/254 X-Sequence-Number: 34727 Ravi Katkar wrote: > I know that postgresql does not support nested transactions, > > I looking for solution for commit, rollback with in function. May > be using the save point. That is essentially the same as nested transactions, isn't it? Just using SQL standard syntax? > I were to use save point in function , when it would get commit.? Each savepoint creates a subtransaction which will be included in the top level transaction unless it or an intermediate savepoint is rolled back. Nothing from the top level transaction is visible to other transactions until the commit of the top level transaction. If this and the docs don't make it clear, please post again: http://www.postgresql.org/docs/8.4/interactive/sql-savepoint.html If you do post again, please include your PostgreSQL version and an explanation of what problem you're trying to solve. More specific questions tend to elicit more useful responses: -Kevin