33 *
44 * Copyright (c) 2000-2003, PostgreSQL Global Development Group
55 *
6- * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.102 2004/07/13 16:48:16 momjian Exp $
6+ * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.103 2004/07/15 03:56:06 momjian Exp $
77 */
88#include "postgres_fe.h"
99#include "describe.h"
@@ -106,7 +106,7 @@ describeAggregates(const char *pattern, bool verbose)
106106 * Takes an optional regexp to select particular tablespaces
107107 */
108108bool
109- describeTablespaces (const char * pattern )
109+ describeTablespaces (const char * pattern , bool verbose )
110110{
111111 PQExpBufferData buf ;
112112 PGresult * res ;
@@ -117,10 +117,17 @@ describeTablespaces(const char *pattern)
117117 printfPQExpBuffer (& buf ,
118118 "SELECT spcname AS \"%s\",\n"
119119 " pg_catalog.pg_get_userbyid(spcowner) AS \"%s\",\n"
120- " spclocation AS \"%s\"\n"
121- "FROM pg_catalog.pg_tablespace\n" ,
120+ " spclocation AS \"%s\"" ,
122121 _ ("Name" ), _ ("Owner" ), _ ("Location" ));
123122
123+ if (verbose )
124+ appendPQExpBuffer (& buf ,
125+ ",\n spcacl as \"%s\"" ,
126+ _ ("Access privileges" ));
127+
128+ appendPQExpBuffer (& buf ,
129+ "\nFROM pg_catalog.pg_tablespace\n" );
130+
124131 processNamePattern (& buf , pattern , false, false,
125132 NULL , "spcname" , NULL ,
126133 NULL );
0 commit comments