From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve psql's \d command to show whether index columns are key
Date: Thu, 19 Jul 2018 18:54:12 +0000
Message-ID: <E1fgE44-0005as-QX@gemulon.postgresql.org> (raw)
Improve psql's \d command to show whether index columns are key columns.
This is essential information when looking at an index that has
"included" columns. Per discussion, follow the style used in \dC
and some other places: column header is "Key?" and values are "yes"
or "no" (all translatable).
While at it, revise describeOneTableDetails to be a bit more maintainable:
avoid hard-wired column numbers and multiple repetitions of what needs
to be identical test logic. This also results in the emitted catalog
query corresponding more closely to what we print, which should be a
benefit to users of ECHO_HIDDEN mode, and perhaps a bit faster too
(the old logic sometimes asked for values it would not print, even
ones that are fairly expensive to get).
Discussion: https://postgr.es/m/21724.1531943735@sss.pgh.pa.us
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/f4a5ce359587257c6d14b8e746889077c649439a
Modified Files
--------------
src/bin/psql/describe.c | 269 ++++++++++++++------------
src/test/regress/expected/alter_table.out | 12 +-
src/test/regress/expected/create_index.out | 28 +--
src/test/regress/expected/index_including.out | 14 +-
src/test/regress/output/tablespace.source | 96 ++++-----
5 files changed, 224 insertions(+), 195 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Improve psql's \d command to show whether index columns are key
In-Reply-To: <E1fgE44-0005as-QX@gemulon.postgresql.org>
References: <E1fgE44-0005as-QX@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox