aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_utilcmd.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-08-05 12:48:45 -0400
committerRobert Haas <rhaas@postgresql.org>2011-08-05 12:53:03 -0400
commit68cbb9f4e70b7b7ed515b5c63bafbe47d9617bf0 (patch)
tree2061219bfcec33dce0bb69debda777cec1acf86a /src/backend/parser/parse_utilcmd.c
parentb43bf617fdb3ecde709892c3bd8997ac41410f2f (diff)
downloadpostgresql-68cbb9f4e70b7b7ed515b5c63bafbe47d9617bf0.tar.gz
postgresql-68cbb9f4e70b7b7ed515b5c63bafbe47d9617bf0.zip
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.
Diffstat (limited to 'src/backend/parser/parse_utilcmd.c')
0 files changed, 0 insertions, 0 deletions