psql: Add option to use expanded mode to all list commands.
authorDean Rasheed <dean.a.rasheed@gmail.com>
Tue, 14 Jan 2025 16:29:15 +0000 (16:29 +0000)
committerDean Rasheed <dean.a.rasheed@gmail.com>
Tue, 14 Jan 2025 16:29:15 +0000 (16:29 +0000)
commit00f4c2959d631c7851da21a512885d1deab28649
tree94c80a8e36b5650d917e289bbc824ca9fd930503
parent94b914f601bd15829df6f83c0246342ca92630b1
psql: Add option to use expanded mode to all list commands.

This allows "x" to be appended to any psql list-like meta-command,
forcing its output to be displayed in expanded mode. This improves
readability in cases where the output is very wide. For example,
"\dfx+" (or equivalently "\df+x") will produce a list of functions,
with additional details, in expanded mode.

This works with all \d* meta-commands, plus \l, \z, and \lo_list, with
the one exception that the expanded mode option "x" cannot be appended
to "\d" by itself, since "\dx" already means something else.

Dean Rasheed, reviewed by Greg Sabino Mullane.

Discussion: https://postgr.es/m/CAEZATCVXJk3KsmCncf7PAVbxdDAUDm3QzDgGT7mBYySWikuOYw@mail.gmail.com
doc/src/sgml/ref/psql-ref.sgml
src/bin/psql/command.c
src/bin/psql/describe.c
src/bin/psql/help.c
src/test/regress/expected/psql.out
src/test/regress/sql/psql.sql