aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-04-08 15:38:26 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-04-08 15:38:26 -0400
commitd1fcbde579d440c35023baa0de7ebf27f644a314 (patch)
tree8c7274276a30ca7ee643f37145c144b94aa3ccb8 /src
parent01add89454d5dc289ed3126d5de03169bdeff41b (diff)
downloadpostgresql-d1fcbde579d440c35023baa0de7ebf27f644a314.tar.gz
postgresql-d1fcbde579d440c35023baa0de7ebf27f644a314.zip
Add support for tab-completion of type arguments in \df, \do.
Oversight in commit a3027e1e7.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/tab-complete.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index d79d7b8145b..26ac786c512 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3988,6 +3988,8 @@ psql_completion(const char *text, int start, int end)
COMPLETE_WITH_QUERY(Query_for_list_of_fdws);
else if (TailMatchesCS("\\df*"))
COMPLETE_WITH_VERSIONED_SCHEMA_QUERY(Query_for_list_of_functions, NULL);
+ else if (HeadMatchesCS("\\df*"))
+ COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_datatypes, NULL);
else if (TailMatchesCS("\\dFd*"))
COMPLETE_WITH_QUERY(Query_for_list_of_ts_dictionaries);
@@ -4005,6 +4007,9 @@ psql_completion(const char *text, int start, int end)
COMPLETE_WITH_QUERY(Query_for_list_of_languages);
else if (TailMatchesCS("\\dn*"))
COMPLETE_WITH_QUERY(Query_for_list_of_schemas);
+ /* no support for completing operators, but we can complete types: */
+ else if (HeadMatchesCS("\\do*", MatchAny))
+ COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_datatypes, NULL);
else if (TailMatchesCS("\\dp") || TailMatchesCS("\\z"))
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_grantables, NULL);
else if (TailMatchesCS("\\dPi*"))