From ee80f043bc9b92dbbb1ff9577c3c601746124092 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Mon, 14 Jul 2014 18:04:52 -0400 Subject: [PATCH] psql: Show tablespace size in \db+ MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fabrízio de Royes Mello --- src/bin/psql/describe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c index 951b7ee3cd..282cd432a2 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -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\"", -- 2.40.0