From 60da196636239a9906a22de1bc1d95133ea9904a Mon Sep 17 00:00:00 2001 From: Itagaki Takahiro Date: Tue, 28 Sep 2010 14:24:02 +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 fcfb1bc97f..4027f77be2 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; }