Skip to content

Commit 72e1d28

Browse files
committed
Show relation size in verbose (e.g. \d+) output.
Dickson S. Guedes
1 parent 6f093f3 commit 72e1d28

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/bin/psql/describe.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.167 2008/04/14 15:04:20 alvherre Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.168 2008/05/02 10:16:16 heikki Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "describe.h"
@@ -1766,9 +1766,14 @@ listTables(const char *tabtypes, const char *pattern, bool verbose)
17661766
gettext_noop("Table"));
17671767

17681768
if (verbose)
1769+
{
1770+
appendPQExpBuffer(&buf,
1771+
",\n pg_catalog.pg_size_pretty(pg_catalog.pg_relation_size(c.oid)) as \"%s\"",
1772+
gettext_noop("Size"));
17691773
appendPQExpBuffer(&buf,
17701774
",\n pg_catalog.obj_description(c.oid, 'pg_class') as \"%s\"",
17711775
gettext_noop("Description"));
1776+
}
17721777

17731778
appendPQExpBuffer(&buf,
17741779
"\nFROM pg_catalog.pg_class c"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy