mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Show relation size in verbose (e.g. \d+) output.
Dickson S. Guedes
This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.167 2008/04/14 15:04:20 alvherre Exp $
|
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.168 2008/05/02 10:16:16 heikki Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "describe.h"
|
#include "describe.h"
|
||||||
@ -1766,9 +1766,14 @@ listTables(const char *tabtypes, const char *pattern, bool verbose)
|
|||||||
gettext_noop("Table"));
|
gettext_noop("Table"));
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
|
{
|
||||||
|
appendPQExpBuffer(&buf,
|
||||||
|
",\n pg_catalog.pg_size_pretty(pg_catalog.pg_relation_size(c.oid)) as \"%s\"",
|
||||||
|
gettext_noop("Size"));
|
||||||
appendPQExpBuffer(&buf,
|
appendPQExpBuffer(&buf,
|
||||||
",\n pg_catalog.obj_description(c.oid, 'pg_class') as \"%s\"",
|
",\n pg_catalog.obj_description(c.oid, 'pg_class') as \"%s\"",
|
||||||
gettext_noop("Description"));
|
gettext_noop("Description"));
|
||||||
|
}
|
||||||
|
|
||||||
appendPQExpBuffer(&buf,
|
appendPQExpBuffer(&buf,
|
||||||
"\nFROM pg_catalog.pg_class c"
|
"\nFROM pg_catalog.pg_class c"
|
||||||
|
Reference in New Issue
Block a user