psql: Show tablespace size in \db+

Fabrízio de Royes Mello
This commit is contained in:
Alvaro Herrera 2014-07-14 18:04:52 -04:00
parent 346d7be184
commit ee80f043bc
1 changed files with 5 additions and 0 deletions

View File

@ -176,6 +176,11 @@ describeTablespaces(const char *pattern, bool verbose)
",\n spcoptions AS \"%s\"",
gettext_noop("Options"));
if (verbose && pset.sversion >= 90200)
appendPQExpBuffer(&buf,
",\n pg_catalog.pg_size_pretty(pg_catalog.pg_tablespace_size(oid)) AS \"%s\"",
gettext_noop("Size"));
if (verbose && pset.sversion >= 80200)
appendPQExpBuffer(&buf,
",\n pg_catalog.shobj_description(oid, 'pg_tablespace') AS \"%s\"",