Need more elaborate explanation regarding transactions

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: lngtmg(at)gmail(dot)com
Subject: Need more elaborate explanation regarding transactions
Date: 2021-12-13 09:54:07
Message-ID: 163938924781.26067.9711768090841362006@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

Browse pgsql-docs by date

  From Date Subject
Next Message Peter Eisentraut 2021-12-13 10:35:49 Re: bad style for SECURITY DEFINER
Previous Message Justin Pryzby 2021-12-13 00:17:07 bad style for SECURITY DEFINER