From: Itagaki Takahiro Date: Tue, 28 Sep 2010 05:27:53 +0000 (+0900) Subject: Add DISCARD to the command_no_begin list for AUTOCOMMIT=off. X-Git-Tag: REL8_3_12~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4f4d022b07ae162a29f36301a17e12da8011816;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 72aad262f5..0f83dd3c45 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -1352,6 +1352,9 @@ command_no_begin(const char *query) return true; } + if (wordlen == 7 && pg_strncasecmp(query, "discard", 7) == 0) + return true; + return false; }