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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix handling of pgbench's hash when no argument is provided
Date: 2018-07-27 04:44:37
Message-ID: E1fiucH-0007Ov-M8@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/39d51fe87dae843574fa2349128679800bfe7ccd

Modified Files
--------------
src/bin/pgbench/exprparse.y | 2 +-
src/bin/pgbench/t/002_pgbench_no_server.pl | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Amit Kapila 2018-07-27 05:44:11 pgsql: Fix the buffer release order for parallel index scans.
Previous Message Tom Lane 2018-07-26 22:18:59 pgsql: Avoid crash in eval_const_expressions if a Param's type changes.