Re: BUG #11524: Unable to add value to ENUM when having AUTOCOMMIT disabled in psql

From: Feike Steenbergen <feikesteenbergen(at)gmail(dot)com>
To: Tomas Vondra <tv(at)fuzzy(dot)cz>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #11524: Unable to add value to ENUM when having AUTOCOMMIT disabled in psql
Date: 2014-09-30 12:05:16
Message-ID: CAK_s-G1LSb0EbUZZzBA782pLEcjVNzo2JcghYTgeCsdcZ44VUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2014-09-30 13:58:44 Re: BUG #11523: Regular expressions work differently on different platforms
Previous Message Tomas Vondra 2014-09-30 11:02:02 Re: BUG #11524: Unable to add value to ENUM when having AUTOCOMMIT disabled in psql