Improve version reporting in pgbench.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 84bee9610965331d5110971d8de390a5bbe2effc
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2021-06-18T21:05:23Z
Releases: 14.0
Improve version reporting in pgbench.

Commit 547f04e73 caused pgbench to start printing its version number,
which seems like a fine idea, but it needs a bit more work:
* Print the server version number too, when different.
* Print the PG_VERSION string, not some reconstructed approximation.

This patch copies psql's well-tested code for the same purpose.

Discussion: https://postgr.es/m/1226654.1624036821@sss.pgh.pa.us

Files

PathChange+/−
src/bin/pgbench/pgbench.c modified +35 −1
src/bin/pgbench/t/001_pgbench_with_server.pl modified +1 −1

Discussion