From: Itagaki Takahiro Date: Tue, 28 Sep 2010 05:26:03 +0000 (+0900) Subject: Add DISCARD to the command_no_begin list for AUTOCOMMIT=off. X-Git-Tag: REL8_4_5~7 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=b66c4fb322b21a57c0b05cd3bd89c49def654eae;p=users%2Fc2main%2Fpostgres.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 c482707e15..c8fc085fa0 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -1369,6 +1369,9 @@ command_no_begin(const char *query) return true; } + if (wordlen == 7 && pg_strncasecmp(query, "discard", 7) == 0) + return true; + return false; }