pgbench: Support double constants and functions.
Robert Haas <rhaas@postgresql.org>
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
| Path | Change | +/− |
|---|---|---|
| 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 |