Hi all, I don't know if I can post a patch here (I did subscribe to psql-patches but without success).
Well, working in the latest revision from CVS I added a feature for psql to the command "\d+", now it shows the object size as like as "\l+" show the database size. I will be pretty glad with yours sugestions and opnion. Thanks. -- []s Dickson S. Guedes ------------------------------------- Projeto Colmeia - Curitiba - PR (41) 3254-7130 ramal: 27 http://makeall.wordpress.com/ http://planeta.postgresql.org.br/
Index: describe.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/bin/psql/describe.c,v retrieving revision 1.166 diff -c -r1.166 describe.c *** describe.c 30 Mar 2008 18:10:20 -0000 1.166 --- describe.c 11 Apr 2008 04:59:56 -0000 *************** *** 1766,1775 **** --- 1766,1781 ---- gettext_noop("Table")); if (verbose) + { appendPQExpBuffer(&buf, ",\n pg_catalog.obj_description(c.oid, 'pg_class') as \"%s\"", gettext_noop("Description")); + appendPQExpBuffer(&buf, + ",\n pg_catalog.pg_size_pretty(pg_catalog.pg_relation_size(c.oid)) as \"%s\"", + gettext_noop("Size")); + } + appendPQExpBuffer(&buf, "\nFROM pg_catalog.pg_class c" "\n JOIN pg_catalog.pg_roles r ON r.oid = c.relowner" *************** *** 1809,1816 **** processSQLNamePattern(pset.db, &buf, pattern, true, false, "n.nspname", "c.relname", NULL, "pg_catalog.pg_table_is_visible(c.oid)"); ! ! appendPQExpBuffer(&buf, "ORDER BY 1,2;"); res = PSQLexec(buf.data, false); termPQExpBuffer(&buf); --- 1815,1825 ---- processSQLNamePattern(pset.db, &buf, pattern, true, false, "n.nspname", "c.relname", NULL, "pg_catalog.pg_table_is_visible(c.oid)"); ! ! if (verbose) ! appendPQExpBuffer(&buf, "ORDER BY 1, pg_catalog.pg_relation_size(c.oid) DESC, 2;"); ! else ! appendPQExpBuffer(&buf, "ORDER BY 1,2;"); res = PSQLexec(buf.data, false); termPQExpBuffer(&buf);
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers