pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: lngtmg@gmail.com
Subject: Need more elaborate explanation regarding transactions
Date: Mon, 13 Dec 2021 09:54:07 +0000
Message-ID: <163938924781.26067.9711768090841362006@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/11/sql-do.html
Description:

https://www.postgresql.org/docs/11/sql-do.html

Says that "If DO is executed in a transaction block, then the procedure code
cannot execute transaction control statements. Transaction control
statements are only allowed if DO is executed in its own transaction."

Ok, what if DO is executed outside of a transaction block but uses COMMIT
inside? Is TX being created automatically at the beginning of the DO?


Message-ID: <163938924781.26067.9711768090841362006@wrigleys.postgresql.org>
Permalink:  ../163938924781.26067.9711768090841362006@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/163938924781.26067.9711768090841362006@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, lngtmg@gmail.com
  Subject: Re: Need more elaborate explanation regarding transactions
  In-Reply-To: <163938924781.26067.9711768090841362006@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox