diff options
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/psql/describe.c | 12 | ||||
-rw-r--r-- | src/bin/psql/tab-complete.c | 8 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index b6aeae22e5d..095a2a891df 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -504,6 +504,11 @@ describeTypes(const char *pattern, bool verbose, bool showSystem) " ) AS \"%s\",\n", gettext_noop("Elements")); } + if (verbose && pset.sversion >= 90200) + { + printACLColumn(&buf, "t.typacl"); + appendPQExpBuffer(&buf, ",\n "); + } appendPQExpBuffer(&buf, " pg_catalog.obj_description(t.oid, 'pg_type') as \"%s\"\n", @@ -2813,9 +2818,16 @@ listDomains(const char *pattern, bool verbose, bool showSystem) gettext_noop("Check")); if (verbose) + { + if (pset.sversion >= 90200) + { + appendPQExpBuffer(&buf, ",\n "); + printACLColumn(&buf, "t.typacl"); + } appendPQExpBuffer(&buf, ",\n d.description as \"%s\"", gettext_noop("Description")); + } appendPQExpBuffer(&buf, "\nFROM pg_catalog.pg_type t\n" diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index bb0fa09f3ea..473706246d0 100644 --- a/src/bin/psql/tab-complete.c +++ b/src/bin/psql/tab-complete.c @@ -2241,13 +2241,15 @@ psql_completion(char *text, int start, int end) pg_strcasecmp(prev_wd, "ON") == 0) COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_tsvf, " UNION SELECT 'DATABASE'" + " UNION SELECT 'DOMAIN'" " UNION SELECT 'FOREIGN DATA WRAPPER'" " UNION SELECT 'FOREIGN SERVER'" " UNION SELECT 'FUNCTION'" " UNION SELECT 'LANGUAGE'" " UNION SELECT 'LARGE OBJECT'" " UNION SELECT 'SCHEMA'" - " UNION SELECT 'TABLESPACE'"); + " UNION SELECT 'TABLESPACE'" + " UNION SELECT 'TYPE'"); else if ((pg_strcasecmp(prev4_wd, "GRANT") == 0 || pg_strcasecmp(prev4_wd, "REVOKE") == 0) && pg_strcasecmp(prev2_wd, "ON") == 0 && @@ -2266,6 +2268,8 @@ psql_completion(char *text, int start, int end) { if (pg_strcasecmp(prev_wd, "DATABASE") == 0) COMPLETE_WITH_QUERY(Query_for_list_of_databases); + else if (pg_strcasecmp(prev_wd, "DOMAIN") == 0) + COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_domains, NULL); else if (pg_strcasecmp(prev_wd, "FUNCTION") == 0) COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_functions, NULL); else if (pg_strcasecmp(prev_wd, "LANGUAGE") == 0) @@ -2274,6 +2278,8 @@ psql_completion(char *text, int start, int end) COMPLETE_WITH_QUERY(Query_for_list_of_schemas); else if (pg_strcasecmp(prev_wd, "TABLESPACE") == 0) COMPLETE_WITH_QUERY(Query_for_list_of_tablespaces); + else if (pg_strcasecmp(prev_wd, "TYPE") == 0) + COMPLETE_WITH_SCHEMA_QUERY(Query_for_list_of_datatypes, NULL); else if (pg_strcasecmp(prev4_wd, "GRANT") == 0) COMPLETE_WITH_CONST("TO"); else |