From: Heikki Linnakangas Date: Fri, 27 Mar 2009 14:58:54 +0000 (+0000) Subject: Fix tab completion of ANALYZE VERBOSE . It was previously confused X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=017ecc15620546d34a45ccf07d874319b138803e;p=users%2Fbernd%2Fpostgres.git Fix tab completion of ANALYZE VERBOSE . It was previously confused with EXPLAIN ANALYZE VERBOSE. Greg Sabino Mullane, reformatted by myself. Backpatch to 8.1, where the bug was introduced. --- diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index 3acf1f29a1..692bde20d7 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -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};