Skip to content

Commit f1e1f99

Browse files
committed
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
1 parent 2943c04 commit f1e1f99

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

doc/src/sgml/ref/psql-ref.sgml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,8 @@ testdb=>
947947

948948
<listitem>
949949
<para>
950-
For each relation (table, view, index, sequence, or foreign table)
950+
For each relation (table, view, materialized view, index, sequence,
951+
or foreign table)
951952
or composite type matching the
952953
<replaceable class="parameter">pattern</replaceable>, show all
953954
columns, their types, the tablespace (if not the default) and any
@@ -962,8 +963,8 @@ testdb=&gt;
962963

963964
<para>
964965
For some types of relation, <literal>\d</> shows additional information
965-
for each column: column values for sequences, indexed expression for
966-
indexes and foreign data wrapper options for foreign tables.
966+
for each column: column values for sequences, indexed expressions for
967+
indexes, and foreign data wrapper options for foreign tables.
967968
</para>
968969

969970
<para>
@@ -983,8 +984,9 @@ testdb=&gt;
983984
<para>
984985
If <command>\d</command> is used without a
985986
<replaceable class="parameter">pattern</replaceable> argument, it is
986-
equivalent to <command>\dtvsE</command> which will show a list of
987-
all visible tables, views, sequences and foreign tables.
987+
equivalent to <command>\dtvmsE</command> which will show a list of
988+
all visible tables, views, materialized views, sequences and
989+
foreign tables.
988990
This is purely a convenience measure.
989991
</para>
990992
</note>

src/bin/psql/describe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2633,7 +2633,6 @@ listDbRoleSettings(const char *pattern, const char *pattern2)
26332633
* s - sequences
26342634
* E - foreign table (Note: different from 'f', the relkind value)
26352635
* (any order of the above is fine)
2636-
* If tabtypes is empty, we default to \dtvsE.
26372636
*/
26382637
bool
26392638
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
26502649
printQueryOpt myopt = pset.popt;
26512650
static const bool translate_columns[] = {false, false, true, false, false, false, false};
26522651

2652+
/* If tabtypes is empty, we default to \dtvmsE (but see also command.c) */
26532653
if (!(showTables || showIndexes || showViews || showMatViews || showSeq || showForeign))
26542654
showTables = showViews = showMatViews = showSeq = showForeign = true;
26552655

0 commit comments

Comments
 (0)