Обсуждение: Need more elaborate explanation regarding transactions

Поиск
Список
Период
Сортировка

Need more elaborate explanation regarding transactions

От
PG Doc comments form
Дата:
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?