Alexey Klyukin <[EMAIL PROTECTED]> writes:
> Gregory Stark wrote:
>> pgbench's random number generator was only generating the first and last
>> 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 (firstname.lastname@example.org)
To make changes to your subscription: