aboutsummaryrefslogtreecommitdiff
path: root/src/bin/psql/describe.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/describe.c')
-rw-r--r--src/bin/psql/describe.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 432063640db..328a1c079f1 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.102 2004/07/13 16:48:16 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.103 2004/07/15 03:56:06 momjian Exp $
*/
#include "postgres_fe.h"
#include "describe.h"
@@ -106,7 +106,7 @@ describeAggregates(const char *pattern, bool verbose)
* Takes an optional regexp to select particular tablespaces
*/
bool
-describeTablespaces(const char *pattern)
+describeTablespaces(const char *pattern, bool verbose)
{
PQExpBufferData buf;
PGresult *res;
@@ -117,10 +117,17 @@ describeTablespaces(const char *pattern)
printfPQExpBuffer(&buf,
"SELECT spcname AS \"%s\",\n"
" pg_catalog.pg_get_userbyid(spcowner) AS \"%s\",\n"
- " spclocation AS \"%s\"\n"
- "FROM pg_catalog.pg_tablespace\n",
+ " spclocation AS \"%s\"",
_("Name"), _("Owner"), _("Location"));
+ if (verbose)
+ appendPQExpBuffer(&buf,
+ ",\n spcacl as \"%s\"",
+ _("Access privileges"));
+
+ appendPQExpBuffer(&buf,
+ "\nFROM pg_catalog.pg_tablespace\n");
+
processNamePattern(&buf, pattern, false, false,
NULL, "spcname", NULL,
NULL);