diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2009-03-27 14:59:46 +0000 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2009-03-27 14:59:46 +0000 |
commit | a6ecfd4719ac7eb2dcd1cdc3b472f25e0c876633 (patch) | |
tree | c6237231056c2c0129393d17eee4e0983fed28da | |
parent | 8f332cf79eff2ce13c566cc858f88a872699a42c (diff) | |
download | postgresql-a6ecfd4719ac7eb2dcd1cdc3b472f25e0c876633.tar.gz postgresql-a6ecfd4719ac7eb2dcd1cdc3b472f25e0c876633.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 d0dac3d070f..65a213e85dd 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2005, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.138.2.1 2005/11/14 17:46:07 momjian Exp $ + * $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.138.2.2 2009/03/27 14:59:46 heikki Exp $ */ /*---------------------------------------------------------------------- @@ -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}; |