Skip to content

Commit c1dcaa8

Browse files
committed
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.
1 parent 2e427ec commit c1dcaa8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/bin/psql/tab-complete.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.180 2009/02/24 10:06:34 petere Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/tab-complete.c,v 1.181 2009/03/27 14:58:46 heikki Exp $
77
*/
88

99
/*----------------------------------------------------------------------
@@ -1624,11 +1624,11 @@ psql_completion(char *text, int start, int end)
16241624

16251625
COMPLETE_WITH_LIST(list_EXPLAIN);
16261626
}
1627-
else if (pg_strcasecmp(prev_wd, "VERBOSE") == 0 &&
1628-
pg_strcasecmp(prev3_wd, "VACUUM") != 0 &&
1629-
pg_strcasecmp(prev4_wd, "VACUUM") != 0 &&
1630-
(pg_strcasecmp(prev2_wd, "ANALYZE") == 0 ||
1631-
pg_strcasecmp(prev2_wd, "EXPLAIN") == 0))
1627+
else if ((pg_strcasecmp(prev2_wd, "EXPLAIN") == 0 &&
1628+
pg_strcasecmp(prev_wd, "VERBOSE") == 0) ||
1629+
(pg_strcasecmp(prev3_wd, "EXPLAIN") == 0 &&
1630+
pg_strcasecmp(prev2_wd, "ANALYZE") == 0 &&
1631+
pg_strcasecmp(prev_wd, "VERBOSE") == 0))
16321632
{
16331633
static const char *const list_EXPLAIN[] =
16341634
{"SELECT", "INSERT", "DELETE", "UPDATE", "DECLARE", NULL};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy