aboutsummaryrefslogtreecommitdiff
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:50:39 -0400
commit112c3fc6db62b39ded8965eddce1f4213308b957 (patch)
treee6c9605363730fc33760760943f270f6716a81d1
parentae9acb677950cf2afa037349b73fa3351d6e1d31 (diff)
downloadpostgresql-112c3fc6db62b39ded8965eddce1f4213308b957.tar.gz
postgresql-112c3fc6db62b39ded8965eddce1f4213308b957.zip
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.
-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 50e4077343a..7c232f8d256 100644
--- a/src/bin/psql/common.c
+++ b/src/bin/psql/common.c
@@ -1386,6 +1386,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. */
@@ -1401,6 +1402,7 @@ command_no_begin(const char *query)
if (wordlen == 3 && pg_strncasecmp(query, "all", 3) == 0)
return true;
+ return false;
}
return false;