Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d08c698 commit 62b6aaaCopy full SHA for 62b6aaa
src/bin/psql/common.c
@@ -1388,8 +1388,20 @@ command_no_begin(const char *query)
1388
return true;
1389
}
1390
1391
+ /* DISCARD ALL isn't allowed in xacts, but other variants are allowed. */
1392
if (wordlen == 7 && pg_strncasecmp(query, "discard", 7) == 0)
- return true;
1393
+ {
1394
+ query += wordlen;
1395
+
1396
+ query = skip_white_space(query);
1397
1398
+ wordlen = 0;
1399
+ while (isalpha((unsigned char) query[wordlen]))
1400
+ wordlen += PQmblen(&query[wordlen], pset.encoding);
1401
1402
+ if (wordlen == 3 && pg_strncasecmp(query, "all", 3) == 0)
1403
+ return true;
1404
+ }
1405
1406
return false;
1407
0 commit comments