aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2009-03-27 14:58:46 +0000
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2009-03-27 14:58:46 +0000
commitc1dcaa86ded99f805d7ecd70e84db4f9a1ada969 (patch)
tree3a2b6bf0c2cc1dc7dde6ec4d78ed07a44e406b58 /src
parent2e427ec05a2b4d9e530babbacb295bed722bed61 (diff)
downloadpostgresql-c1dcaa86ded99f805d7ecd70e84db4f9a1ada969.tar.gz
postgresql-c1dcaa86ded99f805d7ecd70e84db4f9a1ada969.zip
Fix tab completion of ANALYZE VERBOSE <tab>. It was previously confused
with EXPLAIN ANALYZE VERBOSE. Greg Sabino Mullane, reformatted by myself. Backpatch to 8.1, where the bug was introduced.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/tab-complete.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 363857542ea..cb398ae9faa 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.180 2009/02/24 10:06:34 petere Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.181 2009/03/27 14:58:46 heikki Exp $
*/
/*----------------------------------------------------------------------
@@ -1624,11 +1624,11 @@ psql_completion(char *text, int start, int end)
COMPLETE_WITH_LIST(list_EXPLAIN);
}
- else if (pg_strcasecmp(prev_wd, "VERBOSE") == 0 &&
- pg_strcasecmp(prev3_wd, "VACUUM") != 0 &&
- pg_strcasecmp(prev4_wd, "VACUUM") != 0 &&
- (pg_strcasecmp(prev2_wd, "ANALYZE") == 0 ||
- pg_strcasecmp(prev2_wd, "EXPLAIN") == 0))
+ else if ((pg_strcasecmp(prev2_wd, "EXPLAIN") == 0 &&
+ pg_strcasecmp(prev_wd, "VERBOSE") == 0) ||
+ (pg_strcasecmp(prev3_wd, "EXPLAIN") == 0 &&
+ pg_strcasecmp(prev2_wd, "ANALYZE") == 0 &&
+ pg_strcasecmp(prev_wd, "VERBOSE") == 0))
{
static const char *const list_EXPLAIN[] =
{"SELECT", "INSERT", "DELETE", "UPDATE", "DECLARE", NULL};