Re: BUG #11524: Unable to add value to ENUM when having AUTOCOMMIT disabled in psql - Mailing list pgsql-bugs

From Feike Steenbergen
Subject Re: BUG #11524: Unable to add value to ENUM when having AUTOCOMMIT disabled in psql
Date
Msg-id CAK_s-G1LSb0EbUZZzBA782pLEcjVNzo2JcghYTgeCsdcZ44VUQ@mail.gmail.com
Whole thread Raw
In response to Re: BUG #11524: Unable to add value to ENUM when having AUTOCOMMIT disabled in psql  ("Tomas Vondra" <tv@fuzzy.cz>)
Responses Re: BUG #11524: Unable to add value to ENUM when having AUTOCOMMIT disabled in psql
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: "Tomas Vondra"
Date:
Subject: Re: BUG #11524: Unable to add value to ENUM when having AUTOCOMMIT disabled in psql
Next
From: Tom Lane
Date:
Subject: Re: BUG #11523: Regular expressions work differently on different platforms