pgsql: Fix pgbench's getrand() function so that min and max have

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix pgbench's getrand() function so that min and max have
Date: 2008-03-10 01:23:04
Message-ID: 20080310012304.A2010753F33@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Fix pgbench's getrand() function so that min and max have approximately
the same chance of being selected as do numbers between them. Problem
noted by Greg Stark; fix by Alexey Klyukin.

Modified Files:
--------------
pgsql/contrib/pgbench:
pgbench.c (r1.75 -> r1.76)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/contrib/pgbench/pgbench.c?r1=1.75&r2=1.76)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-03-10 02:04:10 pgsql: Reduce memory consumption during VACUUM of large relations, by
Previous Message User Fxjr 2008-03-09 22:51:08 npgsql - Npgsql2: Added support to property ProcessID in