The documentation states about AUTOCOMMIT:
"The autocommit-off mode works by issuing an implicit BEGIN for you, just
before any command that is not already in a transaction block and is not
itself a BEGIN or other transaction-control command, nor a command that
cannot be executed inside a transaction block (such as VACUUM)."
This command cannot be executed with a transaction block, and should
therefore not implicitly start a transaction.
I would expect the same behaviour as for VACUUM, or ALTER SYSTEM. If
AUTOCOMMIT is disabled, these statements can be executed if no transaction
has been started yet.
There seems to be a provision in ./src/bin/psql/common.c for these
statements. The function is command_no_begin.
regards,
Feike Steenbergen