diff options
author | Stephen Frost <sfrost@snowman.net> | 2017-03-07 09:31:52 -0500 |
---|---|---|
committer | Stephen Frost <sfrost@snowman.net> | 2017-03-07 09:31:52 -0500 |
commit | b2678efd43f17db7dfa04e0ca076ea01275cd9bc (patch) | |
tree | 286017423ffd724b3759be1141dc67df45484eae /src/bin/psql/help.c | |
parent | 9a83d56b38c870ce47b7651385ff2add583bf136 (diff) | |
download | postgresql-b2678efd43f17db7dfa04e0ca076ea01275cd9bc.tar.gz postgresql-b2678efd43f17db7dfa04e0ca076ea01275cd9bc.zip |
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
Diffstat (limited to 'src/bin/psql/help.c')
-rw-r--r-- | src/bin/psql/help.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index 91cf0be46a6..ba14df0344d 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -173,6 +173,7 @@ slashUsage(unsigned short int pager) fprintf(output, _(" \\copyright show PostgreSQL usage and distribution terms\n")); fprintf(output, _(" \\errverbose show most recent error message at maximum verbosity\n")); fprintf(output, _(" \\g [FILE] or ; execute query (and send results to file or |pipe)\n")); + fprintf(output, _(" \\gx [FILE] as \\g, but forces expanded output mode\n")); fprintf(output, _(" \\gexec execute query, then execute each value in its result\n")); fprintf(output, _(" \\gset [PREFIX] execute query and store results in psql variables\n")); fprintf(output, _(" \\q quit psql\n")); |