File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 33 *
44 * Copyright (c) 2000-2006, PostgreSQL Global Development Group
55 *
6- * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.133 2006/03/05 15:58:51 momjian Exp $
6+ * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.134 2006/04/26 23: 15:45 momjian Exp $
77 */
88#include "postgres_fe.h"
99#include "describe.h"
@@ -362,14 +362,21 @@ listAllDbs(bool verbose)
362362 ",\n pg_catalog.pg_encoding_to_char(d.encoding) as \"%s\"" ,
363363 _ ("Encoding" ));
364364 if (verbose )
365+ {
366+ appendPQExpBuffer (& buf ,
367+ ",\n t.spcname as \"%s\"" ,
368+ _ ("Tablespace" ));
365369 appendPQExpBuffer (& buf ,
366370 ",\n pg_catalog.shobj_description(d.oid, 'pg_database') as \"%s\"" ,
367371 _ ("Description" ));
372+ }
368373 appendPQExpBuffer (& buf ,
369374 "\nFROM pg_catalog.pg_database d"
370- "\n JOIN pg_catalog.pg_roles r ON d.datdba = r.oid\n"
371- "ORDER BY 1;" );
372-
375+ "\n JOIN pg_catalog.pg_roles r ON d.datdba = r.oid\n" );
376+ if (verbose )
377+ appendPQExpBuffer (& buf ,
378+ " JOIN pg_catalog.pg_tablespace t on d.dattablespace = t.oid\n" );
379+ appendPQExpBuffer (& buf ,"ORDER BY 1;" );
373380 res = PSQLexec (buf .data , false);
374381 termPQExpBuffer (& buf );
375382 if (!res )
You can’t perform that action at this time.
0 commit comments