|From:||Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>|
|To:||PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>|
|Subject:||Re: add modulo (%) operator to pgbench|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
> 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.
|Next Message||Seref Arikan||2014-08-04 09:54:04||How to manage shared library lifetime through C functions|
|Previous Message||Heikki Linnakangas||2014-08-04 08:48:38||Re: Looked at TODO:Considering improving performance of computing CHAR() value lengths|