]> granicus.if.org Git - postgresql/commit
pgbench: Support double constants and functions.
authorRobert Haas <rhaas@postgresql.org>
Tue, 29 Mar 2016 00:45:57 +0000 (20:45 -0400)
committerRobert Haas <rhaas@postgresql.org>
Tue, 29 Mar 2016 00:45:57 +0000 (20:45 -0400)
commit86c43f4e22c0771fd0cc6bce2799802c894ee2ec
tree62f410ad0b26399679198cbb9bbd697d2c73db41
parent9bd61311bd48ea53b18bfecb9adddfd844acbffa
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
doc/src/sgml/ref/pgbench.sgml
src/bin/pgbench/exprparse.y
src/bin/pgbench/exprscan.l
src/bin/pgbench/pgbench.c
src/bin/pgbench/pgbench.h