psql: Refactor SendQuery()

Peter Eisentraut <peter@eisentraut.org>

Commit: 8910a25fef3dc4aa7e10cfcebdc784650a4d256b
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2022-03-31T17:59:29Z
Releases: 15.0
psql: Refactor SendQuery()

This breaks out the fetch-it-all-and-print case in SendQuery() into a
separate function.  This makes the code more similar to the other
cases \gdesc and run query with FETCH_COUNT, and makes SendQuery()
itself a bit smaller.

Extracted from a larger patch with more changes in this area to
follow.

Author: Fabien COELHO <coelho@cri.ensmp.fr>
Discussion: https://www.postgresql.org/message-id/flat/alpine.DEB.2.21.1904132231510.8961@lancre

Files

PathChange+/−
src/bin/psql/common.c modified +64 −40

Discussion