summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2013-08-15 18:24:25 +0200
committerMagnus Hagander <magnus@hagander.net>2013-08-15 18:44:50 +0200
commit62e28b3e41353dd79802113b3e9f2a81246146f0 (patch)
treec5fe084a1ed9f15b725750c604b69f374955e63a /src
parent229fb58d4ff6fc4cd61fc5045edeb25f7fc4800e (diff)
Add tab completion for \dx in psql
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/tab-complete.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 5b7fc93eb26..b3de387b941 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -894,7 +894,7 @@ psql_completion(char *text, int start, int end)
"\\a", "\\connect", "\\conninfo", "\\C", "\\cd", "\\copy", "\\copyright",
"\\d", "\\da", "\\db", "\\dc", "\\dC", "\\dd", "\\dD", "\\des", "\\det", "\\deu", "\\dew", "\\df",
"\\dF", "\\dFd", "\\dFp", "\\dFt", "\\dg", "\\di", "\\dl", "\\dL",
- "\\dn", "\\do", "\\dp", "\\drds", "\\ds", "\\dS", "\\dt", "\\dT", "\\dv", "\\du",
+ "\\dn", "\\do", "\\dp", "\\drds", "\\ds", "\\dS", "\\dt", "\\dT", "\\dv", "\\du", "\\dx",
"\\e", "\\echo", "\\ef", "\\encoding",
"\\f", "\\g", "\\gset", "\\h", "\\help", "\\H", "\\i", "\\ir", "\\l",
"\\lo_import", "\\lo_export", "\\lo_list", "\\lo_unlink",
@@ -3320,6 +3320,8 @@ psql_completion(char *text, int start, int end)
COMPLETE_WITH_QUERY(Query_for_list_of_roles);
else if (strncmp(prev_wd, "\\dv", strlen("\\dv")) == 0)
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_views, NULL);
+ else if (strncmp(prev_wd, "\\dx", strlen("\\dx")) == 0)
+ COMPLETE_WITH_QUERY(Query_for_list_of_extensions);
else if (strncmp(prev_wd, "\\dm", strlen("\\dm")) == 0)
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_matviews, NULL);