public inbox for [email protected]
help / color / mirror / Atom feedFrom: Fabien COELHO <[email protected]>
To: PostgreSQL Developers <[email protected]>
Subject: psql - add SHOW_ALL_RESULTS option
Date: Sat, 13 Apr 2019 22:37:37 +0200 (CEST)
Message-ID: <alpine.DEB.2.21.1904132231510.8961@lancre> (raw)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--8323329-869336793-1555187864=:8961
Content-Type: text/plain; format=flowed; charset=US-ASCII
Hello devs,
The attached patch implements a new SHOW_ALL_RESULTS option for psql,
which shows all results of a combined query (\;) instead of only the last
one.
This solves a frustration that intermediate results were hidden from view
for no good reason that I could think of.
For that, call PQsendQuery instead of (mostly not documented) PQexec, and
rework how results are processed afterwards.
Timing is moved to ProcessQueryResults to keep the last result handling
out of the measured time. I think it would not be a big deal to include
it, but this is the previous behavior.
In passing, refactor a little and add comments. Make function names about
results plural or singular consistently with the fact the it processes one
or several results. Change "PrintQueryResult" to "HandleQueryResult"
because it was not always printing something. Also add a HandleCopyResult
function, which makes the patch a little bigger by moving things around
but clarifies the code.
Code in "common.c" is actually a little shorter than the previous version.
view thread (104+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: psql - add SHOW_ALL_RESULTS option
In-Reply-To: <alpine.DEB.2.21.1904132231510.8961@lancre>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox