Skip to content

Commit 4c4854c

Browse files
committed
The second enables tab-complete to analyze. It ignores schema stuff (so
does every tab-completion command AFAICS) Alvaro Herrera
1 parent dc87055 commit 4c4854c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/bin/psql/tab-complete.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000-2002 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.56 2002/08/10 03:56:24 tgl Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.57 2002/08/15 02:49:04 momjian Exp $
77
*/
88

99
/*----------------------------------------------------------------------
@@ -358,6 +358,14 @@ psql_completion(char *text, int start, int end)
358358
&& strcasecmp(prev_wd, "USER") == 0)
359359
COMPLETE_WITH_QUERY(Query_for_list_of_users);
360360

361+
/* ANALYZE */
362+
/* If the previous word is ANALYZE, produce list of tables. */
363+
else if (strcasecmp(prev_wd, "ANALYZE") == 0)
364+
COMPLETE_WITH_QUERY(Query_for_list_of_tables);
365+
/* If we have ANALYZE <table>, complete with semicolon. */
366+
else if (strcasecmp(prev2_wd, "ANALYZE") == 0)
367+
COMPLETE_WITH_CONST(";");
368+
361369
/* CLUSTER */
362370
/* If the previous word is CLUSTER, produce list of indexes. */
363371
else if (strcasecmp(prev_wd, "CLUSTER") == 0)

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