Re: add modulo (%) operator to pgbench

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: add modulo (%) operator to pgbench
Date: 2015-01-01 14:11:30
Message-ID: 20150101141130.GF1457@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-01-01 16:55:03 Re: Misaligned BufferDescriptors causing major performance problems on AMD
Previous Message Fabien COELHO 2015-01-01 13:02:15 Re: add modulo (%) operator to pgbench