forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd1fc750
committed
Make numeric power() handle NaNs according to the modern POSIX spec.
In commit6bdf130, we ensured that power()/^ for float8 would honorthe NaN behaviors specified by POSIX standards released in this century,ie NaN ^ 0 = 1 and 1 ^ NaN = 1. However, numeric_power() was nottouched and continued to follow the once-common behavior that everycase involving NaN input produces NaN. For consistency, let's switchthe numeric behavior to the modern spec in the same release that ensuresthat behavior for float8.(Note that while6bdf130 was initially back-patched, we later undidthat, concluding that any behavioral change should appear only in v11.)Discussion:https://postgr.es/m/10898.1526421338@sss.pgh.pa.us1 parentb2b8222 commitd1fc750
File tree
3 files changed
+57
-2
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+57
-2
lines changedLines changed: 19 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2972 | 2972 |
| |
2973 | 2973 |
| |
2974 | 2974 |
| |
2975 |
| - | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
2976 | 2978 |
| |
2977 |
| - | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
2978 | 2987 |
| |
| 2988 | + | |
| 2989 | + | |
| 2990 | + | |
| 2991 | + | |
| 2992 | + | |
| 2993 | + | |
| 2994 | + | |
| 2995 | + | |
2979 | 2996 |
| |
2980 | 2997 |
| |
2981 | 2998 |
| |
|
Lines changed: 31 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1664 | 1664 |
| |
1665 | 1665 |
| |
1666 | 1666 |
| |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
1667 | 1698 |
| |
1668 | 1699 |
| |
1669 | 1700 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
911 | 911 |
| |
912 | 912 |
| |
913 | 913 |
| |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
914 | 921 |
| |
915 | 922 |
| |
916 | 923 |
| |
|
0 commit comments
Comments
(0)