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

From Alvaro Herrera
Subject Re: add modulo (%) operator to pgbench
Date
Msg-id 20150101141130.GF1457@alvh.no-ip.org
Whole thread Raw
In response to Re: add modulo (%) operator to pgbench  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
David Rowley wrote:

> 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.

Sounds good to me.  The current syntax is rather messy IMV, and
presumably a function-based syntax might be better.

> We'd likely keep \\setrandom name 1 10 for backwards compatibility.

Yep.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: Publish autovacuum informations
Next
From: Dave Cramer
Date:
Subject: Re: orangutan seizes up during isolation-check