diff options
author | Stephen Frost <sfrost@snowman.net> | 2017-08-24 16:20:48 -0400 |
---|---|---|
committer | Stephen Frost <sfrost@snowman.net> | 2017-08-24 16:20:48 -0400 |
commit | 51d0fa8ed93fe5befe91498f1a3eb5aede32677a (patch) | |
tree | 2ec997dcebed40ef865217f14526f7bde376c4c5 /src/bin/psql/common.c | |
parent | 8a7beca69112755094a3f2ca1daa745d378dd452 (diff) |
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) { |