mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
Add tab completion for psql \dg and \z
Josh Kupershmidt
This commit is contained in:
parent
299591d1a2
commit
a3d40e9fb5
@ -2553,7 +2553,8 @@ psql_completion(char *text, int start, int end)
|
||||
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_indexes, NULL);
|
||||
else if (strncmp(prev_wd, "\\dn", strlen("\\dn")) == 0)
|
||||
COMPLETE_WITH_QUERY(Query_for_list_of_schemas);
|
||||
else if (strncmp(prev_wd, "\\dp", strlen("\\dp")) == 0)
|
||||
else if (strncmp(prev_wd, "\\dp", strlen("\\dp")) == 0
|
||||
|| strncmp(prev_wd, "\\z", strlen("\\z")) == 0)
|
||||
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tsv, NULL);
|
||||
else if (strncmp(prev_wd, "\\ds", strlen("\\ds")) == 0)
|
||||
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_sequences, NULL);
|
||||
@ -2561,7 +2562,8 @@ psql_completion(char *text, int start, int end)
|
||||
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tables, NULL);
|
||||
else if (strncmp(prev_wd, "\\dT", strlen("\\dT")) == 0)
|
||||
COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_datatypes, NULL);
|
||||
else if (strncmp(prev_wd, "\\du", strlen("\\du")) == 0)
|
||||
else if (strncmp(prev_wd, "\\du", strlen("\\du")) == 0
|
||||
|| (strncmp(prev_wd, "\\dg", strlen("\\dg")) == 0))
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user