aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2014-11-10 08:15:17 -0500
committerRobert Haas <rhaas@postgresql.org>2014-11-10 08:15:17 -0500
commit095d40123cedcdfa81c55f0de113067d95370d57 (patch)
tree12efaeb6495ca1d7f0492a0e62a1b6f6ac5578ec /src
parent67067f9ae35fcaf7c1a6f3258043cbd0a0380473 (diff)
downloadpostgresql-095d40123cedcdfa81c55f0de113067d95370d57.tar.gz
postgresql-095d40123cedcdfa81c55f0de113067d95370d57.zip
Tab complete second argument to \c with role names.
Ian Barwick
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/tab-complete.c2
1 files changed, 2 insertions, 0 deletions
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);