From: Heikki Linnakangas Date: Fri, 27 Mar 2009 14:59:46 +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=fa60dce2d0937de546d9d7e21423fbad332435a2;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 4ca69711bd..edf0263c62 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -1248,11 +1248,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};