diff options
author | Stephen Frost <sfrost@snowman.net> | 2017-08-24 16:20:50 -0400 |
---|---|---|
committer | Stephen Frost <sfrost@snowman.net> | 2017-08-24 16:20:50 -0400 |
commit | 0cdc3e47bea442643c9870dc419364b9f2f52dcb (patch) | |
tree | 5580c0d18900e90062239c233d58ab4aa520f228 /src/bin/psql/common.c | |
parent | 6ce6a61840cc90172ad3da7bf303656132fa5fab (diff) | |
download | postgresql-0cdc3e47bea442643c9870dc419364b9f2f52dcb.tar.gz postgresql-0cdc3e47bea442643c9870dc419364b9f2f52dcb.zip |
psql: Fix \gx when FETCH_COUNT is used
Set expanded output when requested through \gx in ExecQueryUsingCursor()
(used when FETCH_COUNT is set).
Discussion: https://www.postgresql.org/message-id/CB7A53AA-5645-4BDD-AB07-4D22CD9D8FF1%40gmx.net
Author: Tobias Bussmann
Diffstat (limited to 'src/bin/psql/common.c')
-rw-r--r-- | src/bin/psql/common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index 044cdb82a7a..a41932ff275 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -1565,6 +1565,10 @@ ExecQueryUsingCursor(const char *query, double *elapsed_msec) "FETCH FORWARD %d FROM _psql_cursor", fetch_count); + /* one-shot expanded output requested via \gx */ + if (pset.g_expanded) + my_popt.topt.expanded = 1; + /* prepare to write output to \g argument, if any */ if (pset.gfname) { |