forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1e02025
committed
Fix incorrect return value for pg_size_pretty(bigint)
pg_size_pretty(bigint) would return the value in bytes rather than PBfor the smallest-most bigint value. This happened due to an incorrectassumption that the absolute value of -9223372036854775808 could bestored 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 issufficiently different and the bug seems sufficiently non-critical thatit does not seem worth risking backpatching further.Author: Joseph Koshakow <koshy44@gmail.com>Discussion:https://postgr.es/m/CAAvxfHdTsMZPWEHUrZ=h3cky9Ccc3Mtx2whUHygY+ABP-mCmUw@mail.gmail.comBackpatch-through: 151 parent821fbd6 commit1e02025
File tree
3 files changed
+18
-2
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+18
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| 578 | + | |
578 | 579 | | |
579 | | - | |
580 | | - | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
581 | 585 | | |
582 | 586 | | |
583 | 587 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
82 | 90 | | |
83 | 91 | | |
84 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
0 commit comments
Comments
(0)