Skip to content
Snippets Groups Projects
Commit c1dcaa86 authored by Heikki Linnakangas's avatar Heikki Linnakangas
Browse files

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.
parent 2e427ec0
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
*
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.180 2009/02/24 10:06:34 petere Exp $
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.181 2009/03/27 14:58:46 heikki Exp $
*/
/*----------------------------------------------------------------------
......@@ -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};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment