forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6ba0d8d
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 parent147d626 commit6ba0d8d
1 file changed
+7
-1
lines changedLines changed: 7 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
497 | 497 |
| |
498 | 498 |
| |
499 | 499 |
| |
| 500 | + | |
| 501 | + | |
| 502 | + | |
500 | 503 |
| |
| 504 | + | |
| 505 | + | |
| 506 | + | |
501 | 507 |
| |
502 |
| - | |
| 508 | + | |
503 | 509 |
| |
504 | 510 |
| |
505 | 511 |
| |
|
0 commit comments
Comments
(0)