diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2009-03-27 14:59:11 +0000 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2009-03-27 14:59:11 +0000 |
commit | 1d15755a655c25d51bd14a115cdfddbda4987b47 (patch) | |
tree | f7d88b2566d5429923dd51c275fd5809d37409cb | |
parent | a4702ada6226bf74acd6e26c88d7db7d10d1b007 (diff) | |
download | postgresql-1d15755a655c25d51bd14a115cdfddbda4987b47.tar.gz postgresql-1d15755a655c25d51bd14a115cdfddbda4987b47.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.
-rw-r--r-- | src/bin/psql/tab-complete.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index b04f2846aa4..35b7ad7bf7a 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2006, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.156 2006/10/04 00:30:06 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.156.2.1 2009/03/27 14:59:11 heikki Exp $ */ /*---------------------------------------------------------------------- @@ -1328,11 +1328,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}; |