summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2009-03-27 14:58:54 +0000
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2009-03-27 14:58:54 +0000
commitf14ce2124dd3e73276290fb1f66c9d783f7b1e20 (patch)
treef8d77002e431e25d85f344f2b3000210c3430092
parent9c7908b1893cf233c15f2993088b1114ba500a7f (diff)
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.
-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 24a7bcab259..59ae2d3224b 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.169 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.169.2.1 2009/03/27 14:58:54 heikki Exp $
*/
/*----------------------------------------------------------------------
@@ -1500,11 +1500,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};