Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix materialized-view documentation oversights.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 19 Jun 2017 22:32:23 +0000 (18:32 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 19 Jun 2017 22:32:23 +0000 (18:32 -0400)
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

doc/src/sgml/ref/psql-ref.sgml
src/bin/psql/describe.c

index 7a43a6936b88e9fcf56ff6a52fbc9d0213964d6a..4cbdb5308c83136664836d9bfc4db833cff32249 100644 (file)
@@ -947,7 +947,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
@@ -962,8 +963,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>
@@ -983,8 +984,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>
index 84ebb2d92315d5aee560933f8338a61392c450f2..e6ceb1c2811da7372c7d2d4c2567522f82dc2e6c 100644 (file)
@@ -2633,7 +2633,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)
@@ -2650,6 +2649,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;