From: Itagaki Takahiro Date: Tue, 28 Sep 2010 05:24:02 +0000 (+0900) Subject: Add DISCARD to the command_no_begin list for AUTOCOMMIT=off. X-Git-Tag: REL9_0_1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60da196636239a9906a22de1bc1d95133ea9904a;p=thirdparty%2Fpostgresql.git Add DISCARD to the command_no_begin list for AUTOCOMMIT=off. Backpatch to 8.3. Reported by Sergey Burladyan. --- diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index fcfb1bc97f3..4027f77be23 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -1388,6 +1388,9 @@ command_no_begin(const char *query) return true; } + if (wordlen == 7 && pg_strncasecmp(query, "discard", 7) == 0) + return true; + return false; }