forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbc43b7c
committed
Fix numeric_power() when the exponent is INT_MIN.
In power_var_int(), the computation of the number of significantdigits to use in the computation used log(Abs(exp)), which isn't safebecause Abs(exp) returns INT_MIN when exp is INT_MIN. Use fabs()instead of Abs(), so that the exponent is cast to a double before theabsolute value is taken.Back-patch to 9.6, where this was introduced (by7d9a473).Discussion:https://postgr.es/m/CAEZATCVd6pMkz=BrZEgBKyqqJrt2xghr=fNc8+Z=5xC6cgWrWA@mail.gmail.com1 parent5a3574d commitbc43b7c
File tree
3 files changed
+8
-1
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+8
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10290 | 10290 |
| |
10291 | 10291 |
| |
10292 | 10292 |
| |
10293 |
| - | |
| 10293 | + | |
10294 | 10294 |
| |
10295 | 10295 |
| |
10296 | 10296 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2321 | 2321 |
| |
2322 | 2322 |
| |
2323 | 2323 |
| |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
2324 | 2330 |
| |
2325 | 2331 |
| |
2326 | 2332 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1089 | 1089 |
| |
1090 | 1090 |
| |
1091 | 1091 |
| |
| 1092 | + | |
1092 | 1093 |
| |
1093 | 1094 |
| |
1094 | 1095 |
| |
|
0 commit comments
Comments
(0)