Commit ee80f043 authored by Alvaro Herrera's avatar Alvaro Herrera

psql: Show tablespace size in \db+

Fabrízio de Royes Mello
parent 346d7be1
...@@ -176,6 +176,11 @@ describeTablespaces(const char *pattern, bool verbose) ...@@ -176,6 +176,11 @@ describeTablespaces(const char *pattern, bool verbose)
",\n spcoptions AS \"%s\"", ",\n spcoptions AS \"%s\"",
gettext_noop("Options")); 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) if (verbose && pset.sversion >= 80200)
appendPQExpBuffer(&buf, appendPQExpBuffer(&buf,
",\n pg_catalog.shobj_description(oid, 'pg_tablespace') AS \"%s\"", ",\n pg_catalog.shobj_description(oid, 'pg_tablespace') AS \"%s\"",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment