summaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/option.c
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2024-07-28 22:23:54 +1200
committerDavid Rowley <drowley@postgresql.org>2024-07-28 22:23:54 +1200
commit6f6b0f193db4f850a94aeabf363bf03bd0642e60 (patch)
treea964cca4bb34ba91e2a71daf5693f9d0ce993b9b /contrib/postgres_fdw/option.c
parentc53016860b8e9c7d511efa86d6368456340343f5 (diff)
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 'contrib/postgres_fdw/option.c')
0 files changed, 0 insertions, 0 deletions