> This patch is pretty trivial.
Another slightly less trivial but more useful version.
The issue is that there are 3 definitions of modulo, two of which are fine
(Knuth floored division and Euclidian), and the last one much less useful.
Alas, C (%) & SQL (MOD) choose the bad definition:-( I really need any of
the other two. The attached patch adds all versions, with "%" and "mod"
consistent with their C and SQL unfortunate counterparts, and "fmod" and
"emod" the sane ones.
> Add modulo operator to pgbench.
>
> This is useful to compute a permutation for tests with non uniform
> accesses (exponential or gaussian), so as to avoid trivial correlations
> between neighbour keys.
--
Fabien.