pgbench: Support double constants and functions.

Robert Haas <rhaas@postgresql.org>

Commit: 86c43f4e22c0771fd0cc6bce2799802c894ee2ec
Author: Robert Haas <rhaas@postgresql.org>
Date: 2016-03-29T00:45:57Z
Releases: 9.6.0
pgbench: Support double constants and functions.

The new functions are pi(), random(), random_exponential(),
random_gaussian(), and sqrt().  I was worried that this would be
slower than before, but, if anything, it actually turns out to be
slightly faster, because we now express the built-in pgbench scripts
using fewer lines; each \setrandom can be merged into a subsequent
\set.

Fabien Coelho

Files

PathChange+/−
doc/src/sgml/ref/pgbench.sgml modified +185 −98
src/bin/pgbench/exprparse.y modified +40 −3
src/bin/pgbench/exprscan.l modified +5 −0
src/bin/pgbench/pgbench.c modified +364 −86
src/bin/pgbench/pgbench.h modified +30 −5

Documentation touched