pgsql: Add DISCARD to the command_no_begin list for AUTOCOMMIT=off.

Started by Itagaki Takahiroalmost 16 years ago3 messagescomitters
Jump to latest
#1Itagaki Takahiro
itagaki.takahiro@gmail.com

Add DISCARD to the command_no_begin list for AUTOCOMMIT=off.
Backpatch to 8.3.

Reported by Sergey Burladyan.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=d08c698d9d47f9d004fd0bb6212ca80259e2fe9c

Modified Files
--------------
src/bin/psql/common.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Itagaki Takahiro (#1)
Re: pgsql: Add DISCARD to the command_no_begin list for AUTOCOMMIT=off.

Itagaki Takahiro <itagaki.takahiro@gmail.com> writes:

Add DISCARD to the command_no_begin list for AUTOCOMMIT=off.

This patch appears incorrect to me. Only the DISCARD ALL variant is
prohibited inside BEGIN, so why is it making all variants of DISCARD
autocommittable?

The DROP coding immediately above is a model for how to deal with
two-word commands.

regards, tom lane

#3Itagaki Takahiro
itagaki.takahiro@gmail.com
In reply to: Tom Lane (#2)
Re: pgsql: Add DISCARD to the command_no_begin list for AUTOCOMMIT=off.

On Tue, Sep 28, 2010 at 3:36 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Itagaki Takahiro <itagaki.takahiro@gmail.com> writes:

Add DISCARD to the command_no_begin list for AUTOCOMMIT=off.

This patch appears incorrect to me.  Only the DISCARD ALL variant is
prohibited inside BEGIN, so why is it making all variants of DISCARD
autocommittable?

The DROP coding immediately above is a model for how to deal with
two-word commands.

Oops, thanks. I'll fix it.

--
Itagaki Takahiro