diff options
author | Heikki Linnakangas | 2009-03-27 14:58:46 +0000 |
---|---|---|
committer | Heikki Linnakangas | 2009-03-27 14:58:46 +0000 |
commit | 47200ff2970619ba1e322d99e5bd5eed51d4b010 (patch) | |
tree | ef3f2f51e5535f8206f913eb3b705edeffd8202b | |
parent | 50caceabad85aa08d087f34838a8ebce9c010ec7 (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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 6241cfec04..8f6a808a8c 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -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}; |