]> granicus.if.org Git - postgresql/commitdiff
psql: Show tablespace size in \db+
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 14 Jul 2014 22:04:52 +0000 (18:04 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Mon, 14 Jul 2014 22:04:52 +0000 (18:04 -0400)
Fabrízio de Royes Mello

src/bin/psql/describe.c

index 951b7ee3cd3c4420e5409a55080052b99d4ca7f9..282cd432a27fc0a84e98666d62d0305b1040f350 100644 (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\"",