Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id C98AA475AC7 for ; Fri, 28 Jun 2002 02:09:23 -0400 (EDT) Mailbox-Line: From josh@agliodbs.com Fri Jun 28 02:09:23 2002 Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id B0A6B475AC7 for ; Fri, 28 Jun 2002 02:08:52 -0400 (EDT) Received: from [63.195.55.98] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9) with HTTP id 1560044; Thu, 27 Jun 2002 23:08:51 -0700 From: "Josh Berkus" Subject: Re: transaction in plpgsql To: Joseph Syjuco , postgres X-Mailer: CommuniGate Pro Web Mailer v.3.5.9 Date: Thu, 27 Jun 2002 23:08:51 -0700 Message-ID: In-Reply-To: <1025283488.13783.6.camel@Askr> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Spam-Status: No, hits=-3.4 required=5.0 tests=IN_REP_TO version=2.30 X-Spam-Level: X-Archive-Number: 200206/381 X-Sequence-Number: 8346 Joe, > how can i implement transactions inside my plpgsql functions You can't. Each PL/pgSQL function is automatically treated as a single transaction by Postgres. As such, the entire function either succeeds or fails. To manage a transaction *inside* the PL/pgSQL function, Postgres would have to support nested transactions ... which we currently don't. Nested transactions and MVCC are somewhat of a tangle to reconcile, and we don't expect a solution until Postgres 8.0 (if then). -Josh Berkus