Re: Chapter 43.8. "Transaction Management" fails to state two critical restrictions

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: bryn(at)yugabyte(dot)com, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Chapter 43.8. "Transaction Management" fails to state two critical restrictions
Date: 2019-09-30 14:24:27
Message-ID: 20190930142427.GA8385@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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 <bruce(at)momjian(dot)us> 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 +

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2019-09-30 15:46:55 Logical replication conflict and trying to use `pg_replication_origin_advance`
Previous Message Anders Åstrand 2019-09-30 09:18:46 Re: Do not use C++ style comments (// comments). Strict ANSI C compilers do not accept them.