Received: from belphigor.mcnaught.org ([216.151.155.121]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f66DX2a59612 for ; Fri, 6 Jul 2001 09:33:02 -0400 (EDT) (envelope-from doug@wireboard.com) Received: (from doug@localhost) by belphigor.mcnaught.org (8.9.3/8.9.3) id JAA01893; Fri, 6 Jul 2001 09:32:35 -0400 X-Authentication-Warning: belphigor.mcnaught.org: doug set sender to doug@wireboard.com using -f To: Daniel =?iso-8859-1?q?=C5kerud?= Cc: "PostgreSQL-general" Subject: Re: Transactions within a function References: <000a01c10618$ca7f0bb0$c901a8c0@automatic100> From: Doug McNaught Date: 06 Jul 2001 09:32:28 -0400 In-Reply-To: Daniel =?iso-8859-1?q?=C5kerud's?= message of "Fri, 6 Jul 2001 14:40:08 +0200" Message-ID: Lines: 20 User-Agent: Gnus/5.0806 (Gnus v5.8.6) XEmacs/21.1 (20 Minutes to Nikko) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by postgresql.org id f66DX3a59615 X-Archive-Number: 200107/163 X-Sequence-Number: 12078 Daniel Åkerud writes: > Do the BEGIN and END in a function also indicate that it is done in a > transaction? Or can you put another BEGIN TRANSACTION; END > TRANSACTION; in there? Please don't post in HTML. A function is always executed within a transaction--either an explicit one (where the user issues BEGIN TRANSACTION) or the implicit transaction created by issuing a single SQL statememt. Since PG doesn't allow nested transactions, you can't have a transaction inside a function. -Doug -- The rain man gave me two cures; he said jump right in, The first was Texas medicine--the second was just railroad gin, And like a fool I mixed them, and it strangled up my mind, Now people just get uglier, and I got no sense of time... --Dylan