2014-08-06 23:38 GMT+09:00 Fabien COELHO <coe...@cri.ensmp.fr>:
> Three different modulo operators seems like a lot for a language that
>> doesn't even have a real expression syntax, but I'll yield to whatever
>> the consensus is on this one.
> Here is a third simpler patch which only implements the Knuth's modulo,
> where the remainder has the same sign as the divisor.
> I would prefer this version 3 (one simple modulo based on Knuth
> definition) or if there is a problem version 2 (all 3 modulos). Version 1
> which provides a modulo compatible with C & SQL is really useless to me.
I like version 3, it is simple and practical. And it's enough in pgbench.
If someone wants to use other implementation of modulo algorithm, he just
changes his source code.