• Robert Haas's avatar
    Modestly improve pgbench's checking for invalid ranges. · 68cbb9f4
    Robert Haas authored
    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.
    68cbb9f4
pgbench.c 61.7 KB