Add DISCARD to the command_no_begin list for AUTOCOMMIT=off.
authorItagaki Takahiro <[email protected]>
Tue, 28 Sep 2010 05:24:02 +0000 (14:24 +0900)
committerItagaki Takahiro <[email protected]>
Tue, 28 Sep 2010 05:24:02 +0000 (14:24 +0900)
Backpatch to 8.3.

Reported by Sergey Burladyan.

src/bin/psql/common.c

index fcfb1bc97f396769ab30292b7b12f6e418d77fbd..4027f77be233ff64933ffd630732fa20b95cf1c3 100644 (file)
@@ -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;
 }