Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEwbI-0002AA-Ua for pgsql-docs@arkaria.postgresql.org; Mon, 30 Sep 2019 14:24:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iEwbH-0002tc-NX for pgsql-docs@arkaria.postgresql.org; Mon, 30 Sep 2019 14:24:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iEwbH-0002tG-DB for pgsql-docs@lists.postgresql.org; Mon, 30 Sep 2019 14:24:31 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iEwbF-0001CC-6f for pgsql-docs@lists.postgresql.org; Mon, 30 Sep 2019 14:24:30 +0000 Received: from bruce by momjian.us with local (Exim 4.92) (envelope-from ) id 1iEwbD-0005Xq-Oc; Mon, 30 Sep 2019 10:24:27 -0400 Date: Mon, 30 Sep 2019 10:24:27 -0400 From: Bruce Momjian To: bryn@yugabyte.com, pgsql-docs@lists.postgresql.org Subject: Re: Chapter 43.8. "Transaction Management" fails to state two critical restrictions Message-ID: <20190930142427.GA8385@momjian.us> References: <156981670710.26184.2375673917366850651@wrigleys.postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <156981670710.26184.2375673917366850651@wrigleys.postgresql.org> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Sep 30, 2019 at 04:11:47AM +0000, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/11/plpgsql-transactions.html > Description: > > This chapter fails to state: > > (1) If a PL/pgSQL procedure issues "commit" then it must be called with > AUTOCOMMIT set to On. This is counter-intuitive. You'd expect the > opposite. You mean psql autocommit mode? > (2) If a PL/pgSQL procedure has a block statement with an exception section > (this might be the procedure's defining block, or an inner block) then that > block's executabe section must not issue "commit". Doing so causes a > run-time error. Uh, that's a good point since you are in a subtransaction at that point. What error do you get? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +