pgsql: Allow psql's \dt and \di to show TOAST tables and their indexes.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Allow psql's \dt and \di to show TOAST tables and their indexes.
Date: 2021-01-05 23:41:59
Message-ID: E1kwvxf-0003nN-Rq@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Allow psql's \dt and \di to show TOAST tables and their indexes.

Formerly, TOAST objects were unconditionally suppressed, but since
\d is able to print them it's not very clear why these variants
should not. Instead, use the same rules as for system catalogs:
they can be seen if you write the 'S' modifier or a table name
pattern. (In practice, since hardly anybody would keep pg_toast
in their search_path, it's really down to whether you use a pattern
that can match pg_toast.*.)

No docs change seems necessary because the docs already say that
this happens for "system objects"; we're just classifying TOAST
tables as being that.

Justin Pryzby, reviewed by Laurenz Albe

Discussion: https://postgr.es/m/20201130165436.GX24052@telsasoft.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7d80441d2c8de5cd5d593e302bd14e8b19ee92d4

Modified Files
--------------
src/bin/psql/describe.c | 27 +++++++++------------------
src/test/regress/expected/psql.out | 14 ++++++++++++++
src/test/regress/sql/psql.sql | 2 ++
3 files changed, 25 insertions(+), 18 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-01-06 00:03:59 pgsql: Revert unstable test cases from commit 7d80441d2.
Previous Message Tom Lane 2021-01-05 21:18:18 pgsql: Introduce a new GUC_REPORT setting "in_hot_standby".