From: | Peter Eisentraut <peter(at)eisentraut(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: pgbench: Make set_random_seed() 64-bit everywhere. |
Date: | 2025-03-29 14:31:17 |
Message-ID: | E1tyXDR-001bBG-27@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
pgbench: Make set_random_seed() 64-bit everywhere.
Delete an intermediate variable, a redundant cast, a use of long and a
use of long long. scanf() the seed directly into a uint64, now that we
can do that with SCNu64 from <inttypes.h>.
The previous coding was from pre-C99 times when %lld might not have been
there, so it read into an unsigned long. Therefore behavior varied
by OS, and --random-seed would accept either 32 or 64 bit seeds. Now
it's the same everywhere.
Author: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Discussion: https://postgr.es/m/b936d2fb-590d-49c3-a615-92c3a88c6c19%40eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/53a2a1564ae450a46a7c565756ab536b84150e36
Modified Files
--------------
src/bin/pgbench/pgbench.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tomas Vondra | 2025-03-29 14:44:54 | pgsql: amcheck: Add gin_index_check() to verify GIN index |
Previous Message | Tomas Vondra | 2025-03-29 14:19:56 | pgsql: amcheck: Move common routines into a separate module |