From b66c4fb322b21a57c0b05cd3bd89c49def654eae Mon Sep 17 00:00:00 2001 From: Itagaki Takahiro Date: Tue, 28 Sep 2010 14:26:03 +0900 Subject: [PATCH] Add DISCARD to the command_no_begin list for AUTOCOMMIT=off. Backpatch to 8.3. Reported by Sergey Burladyan. --- src/bin/psql/common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index c482707e151..c8fc085fa04 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; }