aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-06-19 18:32:22 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-06-19 18:32:38 -0400
commitd14c85ed1abb5d01b10313715ab73aadb9a7a7af (patch)
tree84979ce387a4aecd9fb33fd7a5753e1bf34d6eb9
parent1c25ef6363f38253e5ac080373eef7f3305fa5dc (diff)
downloadpostgresql-d14c85ed1abb5d01b10313715ab73aadb9a7a7af.tar.gz
postgresql-d14c85ed1abb5d01b10313715ab73aadb9a7a7af.zip
Fix materialized-view documentation oversights.
When materialized views were added, psql's \d commands were made to treat them as a separate object category ... but not everyplace in the documentation or comments got the memo. Noted by David Johnston. Back-patch to 9.3 where matviews came in. Discussion: https://postgr.es/m/CAKFQuwb27M3VXRhHErjCpkWwN9eKThbqWb1=trtoXi9_ejqPXQ@mail.gmail.com
-rw-r--r--doc/src/sgml/ref/psql-ref.sgml12
-rw-r--r--src/bin/psql/describe.c2
2 files changed, 8 insertions, 6 deletions
diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml
index e6eba21edab..9faa365481b 100644
--- a/doc/src/sgml/ref/psql-ref.sgml
+++ b/doc/src/sgml/ref/psql-ref.sgml
@@ -1096,7 +1096,8 @@ testdb=&gt;
<listitem>
<para>
- For each relation (table, view, index, sequence, or foreign table)
+ For each relation (table, view, materialized view, index, sequence,
+ or foreign table)
or composite type matching the
<replaceable class="parameter">pattern</replaceable>, show all
columns, their types, the tablespace (if not the default) and any
@@ -1111,8 +1112,8 @@ testdb=&gt;
<para>
For some types of relation, <literal>\d</> shows additional information
- for each column: column values for sequences, indexed expression for
- indexes and foreign data wrapper options for foreign tables.
+ for each column: column values for sequences, indexed expressions for
+ indexes, and foreign data wrapper options for foreign tables.
</para>
<para>
@@ -1134,8 +1135,9 @@ testdb=&gt;
<para>
If <command>\d</command> is used without a
<replaceable class="parameter">pattern</replaceable> argument, it is
- equivalent to <command>\dtvsE</command> which will show a list of
- all visible tables, views, sequences and foreign tables.
+ equivalent to <command>\dtvmsE</command> which will show a list of
+ all visible tables, views, materialized views, sequences and
+ foreign tables.
This is purely a convenience measure.
</para>
</note>
diff --git a/src/bin/psql/describe.c b/src/bin/psql/describe.c
index 1c268f0b08f..ea0e8af2ecd 100644
--- a/src/bin/psql/describe.c
+++ b/src/bin/psql/describe.c
@@ -3288,7 +3288,6 @@ listDbRoleSettings(const char *pattern, const char *pattern2)
* s - sequences
* E - foreign table (Note: different from 'f', the relkind value)
* (any order of the above is fine)
- * If tabtypes is empty, we default to \dtvsE.
*/
bool
listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSystem)
@@ -3305,6 +3304,7 @@ listTables(const char *tabtypes, const char *pattern, bool verbose, bool showSys
printQueryOpt myopt = pset.popt;
static const bool translate_columns[] = {false, false, true, false, false, false, false};
+ /* If tabtypes is empty, we default to \dtvmsE (but see also command.c) */
if (!(showTables || showIndexes || showViews || showMatViews || showSeq || showForeign))
showTables = showViews = showMatViews = showSeq = showForeign = true;