psql: Add \gx command
Stephen Frost <sfrost@snowman.net>
psql: Add \gx command It can often be useful to use expanded mode output (\x) for just a single query. Introduce a \gx which acts exactly like \g except that it will force expanded output mode for that one \gx call. This is simpler than having to use \x as a toggle and also means that the user doesn't have to worry about the current state of the expanded variable, or resetting it later, to ensure a given query is always returned in expanded mode. Primairly Christoph's patch, though I did tweak the documentation and help text a bit, and re-indented the tab completion section. Author: Christoph Berg Reviewed By: Daniel Verite Discussion: https://postgr.es/m/20170127132737.6skslelaf4txs6iw%40msg.credativ.de
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/ref/psql-ref.sgml | modified | +12 −0 |
| src/bin/psql/command.c | modified | +7 −2 |
| src/bin/psql/common.c | modified | +7 −0 |
| src/bin/psql/help.c | modified | +1 −0 |
| src/bin/psql/settings.h | modified | +1 −0 |
| src/bin/psql/tab-complete.c | modified | +6 −5 |
| src/test/regress/expected/psql.out | modified | +23 −0 |
| src/test/regress/sql/psql.sql | modified | +7 −0 |
Documentation touched
Discussion
- One-shot expanded output in psql using \G 45 messages · 2017-01-27 → 2017-08-24