pgsql: Modestly improve pgbench's checking for invalid ranges.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема pgsql: Modestly improve pgbench's checking for invalid ranges.
Дата
Msg-id E1QpNfQ-0002AR-BR@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Modestly improve pgbench's checking for invalid ranges.

The old check against MAX_RANDOM_VALUE is clearly irrelevant since
getrand() no longer calls random().  Instead, check whether min and max
are close enough together to avoid an overflow inside getrand(), as
suggested by Tom Lane.  This is still somewhat silly, because we're
using atoi(), which doesn't check for overflow anyway and (at least on
my system) will cheerfully return 0 when given "4294967296".  But that's
a problem for another commit.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/68cbb9f4e70b7b7ed515b5c63bafbe47d9617bf0

Modified Files
--------------
contrib/pgbench/pgbench.c |   18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: pgsql: Tweak PQresStatus() to avoid a clang compiler warning.
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Allow per-column foreign data wrapper options.