Re: pgsql: Make pgbench use erand48() rather than random().

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: pgsql: Make pgbench use erand48() rather than random().
Дата
Msg-id CA+TgmoZ_PHpOQ6B+L9CYXzfBzvXr4kX9zBt=_fXFvk1S3UW6MA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Make pgbench use erand48() rather than random().  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
On Wed, Aug 3, 2011 at 6:36 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I do however notice a vestigial reference to MAX_RANDOM_VALUE at line
> 1063, which we probably should get rid of.  What I think we probably
> need instead, and don't have, is a check that "max - min + 1" doesn't
> overflow.

Seems reasonable.  Do you want to take care of that, or shall I do it?

Off-hand, the easiest approach seems to be to define SAMESIGN in
pgbench.c using the same definition we employ in various other places,
and then copy the test we use in int4pl().

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

В списке pgsql-committers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Make pgbench use erand48() rather than random().
Следующее
От: Bruce Momjian
Дата:
Сообщение: pgsql: In documentaiton, clarify which commands have reduced WAL volume