pgsql: Add support for \aset in pgbench

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add support for \aset in pgbench
Date: 2020-04-03 02:46:33
Message-ID: E1jKCLp-0007Xx-CH@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add support for \aset in pgbench

This option is similar to \gset, except that it is able to store all
results from combined SQL queries into separate variables. If a query
returns multiple rows, the last result is stored and if a query returns
no rows, nothing is stored.

While on it, add a TAP test for \gset to check for a failure when a
query returns multiple rows.

Author: Fabien Coelho
Reviewed-by: Ibrar Ahmed, Michael Paquier
Discussion: https://postgr.es/m/alpine.DEB.2.21.1904081914200.2529@lancre

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9d8ef98800bd291de145fb1be41f0868546e02ab

Modified Files
--------------
doc/src/sgml/ref/pgbench.sgml | 22 +++++++++--
src/bin/pgbench/pgbench.c | 56 ++++++++++++++++++++--------
src/bin/pgbench/t/001_pgbench_with_server.pl | 45 ++++++++++++++++++++++
3 files changed, 104 insertions(+), 19 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2020-04-03 02:58:22 Re: pgsql: Include information on buffer usage during planning phase, in EX
Previous Message Fujii Masao 2020-04-03 02:28:27 pgsql: Include information on buffer usage during planning phase, in EX