From 5c7d9632d00fa1deab6db90040d93eb08626c1d2 Mon Sep 17 00:00:00 2001 From: heikki Date: Fri, 2 May 2008 10:16:16 +0000 Subject: [PATCH] Show relation size in verbose (e.g. \d+) output. Dickson S. Guedes --- 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 8487a2b9ae..7e58580576 100644 --- a/src/bin/psql/describe.c +++ b/src/bin/psql/describe.c @@ -1766,9 +1766,14 @@ listTables(const char *tabtypes, const char *pattern, bool verbose) gettext_noop("Table")); if (verbose) + { + appendPQExpBuffer(&buf, + ",\n pg_catalog.pg_size_pretty(pg_catalog.pg_relation_size(c.oid)) as \"%s\"", + gettext_noop("Size")); appendPQExpBuffer(&buf, ",\n pg_catalog.obj_description(c.oid, 'pg_class') as \"%s\"", gettext_noop("Description")); + } appendPQExpBuffer(&buf, "\nFROM pg_catalog.pg_class c" -- 2.11.4.GIT