From: Itagaki Takahiro Date: Tue, 28 Sep 2010 05:20:17 +0000 (+0900) Subject: Add DISCARD to the command_no_begin list for AUTOCOMMIT=off. X-Git-Tag: REL9_1_ALPHA2~141 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d08c698d9d47f9d004fd0bb6212ca80259e2fe9c;p=postgresql 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 c2c572c42d..7ba2f73c5d 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; }