Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 8D6B1477285 for ; Fri, 28 Jun 2002 12:08:52 -0400 (EDT) Mailbox-Line: From josh@agliodbs.com Fri Jun 28 12:08:52 2002 Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id DC71C4772DC for ; Fri, 28 Jun 2002 11:36:08 -0400 (EDT) Received: from [63.195.55.98] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9) with HTTP id 1560422; Fri, 28 Jun 2002 08:36:12 -0700 From: "Josh Berkus" Subject: Re: transaction in plpgsql To: Joseph Syjuco , pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.5.9 Date: Fri, 28 Jun 2002 08:36:12 -0700 Message-ID: In-Reply-To: <1025295705.13808.9.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/396 X-Sequence-Number: 8361 Joseph, > so does that mean that if i call function 2 from function 1 and > function > 2 fails than function 1 and function 2 rolls back > > hopefully the answer is yes That's correct. To diagram: Function 1 calls | V Function 2 calls | V Function 3, which fails | V Function 3 is rolled back | V Function 2 is rolled back | V Function 1 is rolled back While this automatic tranactioning and "All succeed or fail together" functionality is sometimes useful, its often also a major annoyance. Changing it is on the "todo" list, but poses some major technical challenges. -Josh Berkus