Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCnVf-000696-Vy for pgsql-docs@arkaria.postgresql.org; Mon, 31 Aug 2020 17:22:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kCnVe-0001cb-UL for pgsql-docs@arkaria.postgresql.org; Mon, 31 Aug 2020 17:22:22 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCnTl-0000Z7-Tl for pgsql-docs@lists.postgresql.org; Mon, 31 Aug 2020 17:20:25 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCnTj-00033w-7k for pgsql-docs@lists.postgresql.org; Mon, 31 Aug 2020 17:20:25 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1kCnTf-0003WD-PG; Mon, 31 Aug 2020 13:20:19 -0400 Date: Mon, 31 Aug 2020 13:20:19 -0400 From: Bruce Momjian To: Peter Eisentraut Cc: Pavel Stehule , "David G. Johnston" , Robin Abbi , Dave Cramer , Pg Docs Subject: Re: Procedures Message-ID: <20200831172019.GG13613@momjian.us> References: <20200822171447.GF26781@momjian.us> <20200824150056.GI26781@momjian.us> <20200824153557.GK26781@momjian.us> <20200824153847.GL26781@momjian.us> <20200824160023.GM26781@momjian.us> <20200825190313.GE26852@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200825190313.GE26852@momjian.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Aug 25, 2020 at 03:03:13PM -0400, Bruce Momjian wrote: > On Tue, Aug 25, 2020 at 08:38:11PM +0200, Peter Eisentraut wrote: > > On 2020-08-24 18:00, Bruce Momjian wrote: > > > - command, a procedure is called explicitly using > > > - the statement. > > > + command, a procedure is called in isolation using > > > + the command. If the CALL command is not > > > + part of an explicit transaction, a procedure can commit, rollback, > > > + and begin new transactions during its execution, which is not possible > > > + in functions. > > > > There are additional conditions for when a procedure can do transaction > > control, and it also depends on the language. It's not clear how much > > detail we should give in a general section like this. Often people read > > this and then wonder why it doesn't work. > > I have updated the patch to mention it is dependend on the server-side > language. Patch applied back through PG 11. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com The usefulness of a cup is in its emptiness, Bruce Lee