forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitaf0f200
committed
Fix pg_size_pretty() to avoid overflow for inputs close to INT64_MAX.
The expression that tried to round the value to the nearest TB couldoverflow, leading to bogus output as reported in bug #5993 from NicolaCossu. This isn't likely to ever happen in the intended usage of thefunction (if it could, we'd be needing to use a wider datatype instead);but it's not hard to give the expected output, so let's do so.1 parentf8ebe3b commitaf0f200
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
490 | 490 |
| |
491 | 491 |
| |
492 | 492 |
| |
| 493 | + | |
| 494 | + | |
| 495 | + | |
493 | 496 |
| |
| 497 | + | |
| 498 | + | |
| 499 | + | |
494 | 500 |
| |
495 |
| - | |
| 501 | + | |
496 | 502 |
| |
497 | 503 |
| |
498 | 504 |
| |
|
0 commit comments
Comments
(0)