postgres.git / summary / log / commit / refs
commit 095d40123cedcdfa81c55f0de113067d95370d57
Author: Robert Haas <rhaas@postgresql.org>
Date: Mon Nov 10 13:15:17 2014 +0000
First released in: 9.5.0
Tab complete second argument to \c with role names.
Ian Barwick
src/bin/psql/tab-complete.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 886188c036f..56dc688fcb7 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3704,6 +3704,8 @@ psql_completion(const char *text, int start, int end)
}
else if (strcmp(prev_wd, "\\connect") == 0 || strcmp(prev_wd, "\\c") == 0)
COMPLETE_WITH_QUERY(Query_for_list_of_databases);
+ else if (strcmp(prev2_wd, "\\connect") == 0 || strcmp(prev2_wd, "\\c") == 0)
+ COMPLETE_WITH_QUERY(Query_for_list_of_roles);
else if (strncmp(prev_wd, "\\da", strlen("\\da")) == 0)
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_aggregates, NULL);
[parent: 67067f9ae35f]