summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-09-28 14:47:25 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2010-09-28 14:48:57 -0400
commit3e20490e862f9da0d7530b8bac80bcb9a5c05cac (patch)
tree2064c0e4a29c60a88b752d67c9f086e823f4d73b /src
parent334ca4fef875097f08b64016b61dad9d97428ae9 (diff)
Fix another small oversight in command_no_begin patch.
Need a "return false" to prevent tests from continuing after we've moved the "query" pointer. As it stood, it'd accept "DROP DISCARD ALL" as a match.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c
index 64577084a2f..9670dc62b88 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -1350,6 +1350,7 @@ command_no_begin(const char *query)
return true;
if (wordlen == 10 && pg_strncasecmp(query, "tablespace", 10) == 0)
return true;
+ return false;
}
/* DISCARD ALL isn't allowed in xacts, but other variants are allowed. */
@@ -1365,6 +1366,7 @@ command_no_begin(const char *query)
if (wordlen == 3 && pg_strncasecmp(query, "all", 3) == 0)
return true;
+ return false;
}
return false;