Alexey Klyukin <[EMAIL PROTECTED]> writes:
> Gregory Stark wrote:
>> pgbench's random number generator was only generating the first and last 
>> value
>> in the specified range half as often as other values in the range.

> I think this line should be altered this way: 
> return min + (int) (((max - min + 1) * (double) random()) / (MAX_RANDOM_VALUE 
> + 1.0));
> eliminating the result of max + 1 in a corner case when random() equals to 

Yeah, that looks more correct.  Applied.

                        regards, tom lane

Sent via pgsql-patches mailing list (
To make changes to your subscription:

Reply via email to