- Notifications
You must be signed in to change notification settings - Fork5k
Commitd3964cd
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 parent1e28982 commitd3964cd
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
405 | 405 |
| |
406 | 406 |
| |
407 | 407 |
| |
| 408 | + | |
| 409 | + | |
| 410 | + | |
408 | 411 |
| |
| 412 | + | |
| 413 | + | |
| 414 | + | |
409 | 415 |
| |
410 |
| - | |
| 416 | + | |
411 | 417 |
| |
412 | 418 |
| |
413 | 419 |
| |
|
0 commit comments
Comments
(0)