aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/variable.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2024-07-28 22:24:15 +1200
committerDavid Rowley <drowley@postgresql.org>2024-07-28 22:24:15 +1200
commit0a80e88d902d3dfdeed03ede1880b8994a8d892b (patch)
tree0fc8417fbb16d582383c03adabeb429d54226859 /src/backend/commands/variable.c
parent6ddc8556ce4aff68446ebe00f14930bc0bbeccca (diff)
downloadpostgresql-0a80e88d902d3dfdeed03ede1880b8994a8d892b.tar.gz
postgresql-0a80e88d902d3dfdeed03ede1880b8994a8d892b.zip
Fix incorrect return value for pg_size_pretty(bigint)
pg_size_pretty(bigint) would return the value in bytes rather than PB for the smallest-most bigint value. This happened due to an incorrect assumption that the absolute value of -9223372036854775808 could be stored inside a signed 64-bit type. Here we fix that by instead storing that value in an unsigned 64-bit type. This bug does exist in versions prior to 15 but the code there is sufficiently different and the bug seems sufficiently non-critical that it does not seem worth risking backpatching further. Author: Joseph Koshakow <koshy44@gmail.com> Discussion: https://postgr.es/m/CAAvxfHdTsMZPWEHUrZ=h3cky9Ccc3Mtx2whUHygY+ABP-mCmUw@mail.gmail.com Backpatch-through: 15
Diffstat (limited to 'src/backend/commands/variable.c')
0 files changed, 0 insertions, 0 deletions