Need more elaborate explanation regarding transactions - Mailing list pgsql-docs

From PG Doc comments form
Subject Need more elaborate explanation regarding transactions
Date
Msg-id 163938924781.26067.9711768090841362006@wrigleys.postgresql.org
Whole thread Raw
List pgsql-docs
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?

pgsql-docs by date:

Previous
From: Justin Pryzby
Date:
Subject: bad style for SECURITY DEFINER
Next
From: Peter Eisentraut
Date:
Subject: Re: bad style for SECURITY DEFINER