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

From David Rowley
Subject Re: add modulo (%) operator to pgbench
Date
Msg-id CAApHDvqVFECe1T+CLvWQMooX9Zr+BzjRTyDkXT31p36VhZBKqA@mail.gmail.com
Whole thread Raw
In response to Re: add modulo (%) operator to pgbench  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: add modulo (%) operator to pgbench
Re: add modulo (%) operator to pgbench
List pgsql-hackers
On 1 January 2015 at 21:23, Fabien COELHO <coelho@cri.ensmp.fr> wrote:

I was about to go and look at this, but I had a problem when attempting to
compile with MSVC.

Thanks! Here is a v4 which includes your fix.

Thank you.

I've had a quick look at the patch as I'm quite interested in seeing some improvements in this area.

At the moment I feel the patch is a bit half done. I really think that since the gaussian and exponential stuff was added in commit ed802e7d, that this should now be changed so that we have functions like random(), erandom() and grandom() and the way to use this becomes:

\set name random(1,10)
\set name erandom(1,10)

And we completely pull out the new \\setrandom additions added in that commit. We'd likely keep \\setrandom name 1 10 for backwards compatibility.

Does anyone else feel strongly about fixing this now, while we have the chance?

Regards

David Rowley

pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: add modulo (%) operator to pgbench
Next
From: Amit Kapila
Date:
Subject: Re: Parallel Seq Scan