Fix handling of pgbench's hash when no argument is provided

Michael Paquier <michael@paquier.xyz>

Commit: c2e5f60db160d74ba862023ec460ace938f4fb1c
Author: Michael Paquier <michael@paquier.xyz>
Date: 2018-07-27T04:43:36Z
Releases: 11.0
Fix handling of pgbench's hash when no argument is provided

Depending on the platform used, this can cause a crash in the worst
case, or an unhelpful error message, so fail gracefully.

Author: Fabien Coelho
Discussion: https://postgr.es/m/alpine.DEB.2.21.1807262302550.29874@lancre
Backpatch: 11-, where hash() has been added in pgbench.

Files

PathChange+/−
src/bin/pgbench/exprparse.y modified +1 −1
src/bin/pgbench/t/002_pgbench_no_server.pl modified +20 −0

Discussion