]> granicus.if.org Git - postgresql/commitdiff
Add DISCARD to the command_no_begin list for AUTOCOMMIT=off.
authorItagaki Takahiro <itagaki.takahiro@gmail.com>
Tue, 28 Sep 2010 05:27:53 +0000 (14:27 +0900)
committerItagaki Takahiro <itagaki.takahiro@gmail.com>
Tue, 28 Sep 2010 05:27:53 +0000 (14:27 +0900)
Backpatch to 8.3.

Reported by Sergey Burladyan.

src/bin/psql/common.c

index 72aad262f5af02c974b83d9e1073e61c423e5697..0f83dd3c45129a73b7c57e792ccee2bf84244493 100644 (file)
@@ -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;
 }