Re: add modulo (%) operator to pgbench - Mailing list pgsql-hackers

From Mitsumasa KONDO
Subject Re: add modulo (%) operator to pgbench
Date
Msg-id CADupcHX-mXEkZKgFu3zHtu4p3rC-5fyWK+i=O1Sqff1=erKKeA@mail.gmail.com
Whole thread Raw
In response to Re: add modulo (%) operator to pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
2014-09-11 15:47 GMT+09:00 Fabien COELHO <coelho@cri.ensmp.fr>:

Hello Robert,

I am not objecting to the functionality; I'm objecting to bolting on
ad-hoc operators one at a time.  I think an expression syntax would
let us do this in a much more scalable way.  If I had time, I'd go do
that, but I don't.  We could add abs(x) and hash(x) and it would all
be grand.

Ok. I do agree that an expression syntax would be great!
Yes, it's not bad.

However, will we need some method of modulo calculation?
I don't think so much. I think most intuitive modulo calculation method is floor modulo,
Because if we use the negative value in modulo calculation, it just set negative value as both positive values,
it is easy to expect the result than others. This strong point is good for benchmark script users.

But I don't have any strong opinion about this patch, not blocking:)

Best Regards
--
Mistumasa KONDO

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Memory Alignment in Postgres
Next
From: Robert Haas
Date:
Subject: Re: Aussie timezone database changes incoming