Tablespace options in \db+
Currently, tablespace options (such as random_page_cost) aren't shown in
\db or \db+ in psql - the only way to see them is to directly query
pg_tablespaces. This seems like an oversight from back when the feature was
added.
I realize the CF is closed, but would people be ok with me pushing this
trivial patch into 9.4?
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
Attachments:
psql_tablespace_options.patchtext/x-patch; charset=US-ASCII; name=psql_tablespace_options.patchDownload
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 0d4b151..43f1a1c 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -176,6 +176,11 @@ describeTablespaces(const char *pattern, bool verbose)
",\n pg_catalog.shobj_description(oid, 'pg_tablespace') AS \"%s\"",
gettext_noop("Description"));
+ if (verbose && pset.sversion >= 90000)
+ appendPQExpBuffer(&buf,
+ ",\n spcoptions AS \"%s\"",
+ gettext_noop("Options"));
+
appendPQExpBufferStr(&buf,
"\nFROM pg_catalog.pg_tablespace\n");
* Magnus Hagander (magnus@hagander.net) wrote:
Currently, tablespace options (such as random_page_cost) aren't shown in
\db or \db+ in psql - the only way to see them is to directly query
pg_tablespaces. This seems like an oversight from back when the feature was
added.I realize the CF is closed, but would people be ok with me pushing this
trivial patch into 9.4?
It's practically a bugfix, imv. +1 from me for committing it.
Thanks,
Stephen