Commit 8ce423b
committed
Fix numeric width_bucket() to allow its first argument to be infinite.
While the calculation is not well-defined if the bounds arguments are
infinite, there is a perfectly sane outcome if the test operand is
infinite: it's just like any other value that's before the first bucket
or after the last one. width_bucket_float8() got this right, but
I was too hasty about the case when adding infinities to numerics
(commit a57d312), so that width_bucket_numeric() just rejected it.
Fix that, and sync the relevant error message strings.
No back-patch needed, since infinities-in-numeric haven't shipped yet.
Discussion: https://postgr.es/m/2465409.1602170063@sss.pgh.pa.us1 parent b90b79e commit 8ce423b
File tree
3 files changed
+21
-8
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1724 | 1724 | | |
1725 | 1725 | | |
1726 | 1726 | | |
1727 | | - | |
| 1727 | + | |
| 1728 | + | |
1728 | 1729 | | |
1729 | 1730 | | |
1730 | | - | |
| 1731 | + | |
1731 | 1732 | | |
1732 | 1733 | | |
1733 | 1734 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1316 | 1316 | | |
1317 | 1317 | | |
1318 | 1318 | | |
1319 | | - | |
1320 | | - | |
1321 | 1319 | | |
1322 | | - | |
| 1320 | + | |
1323 | 1321 | | |
1324 | 1322 | | |
1325 | 1323 | | |
| |||
1362 | 1360 | | |
1363 | 1361 | | |
1364 | 1362 | | |
1365 | | - | |
| 1363 | + | |
1366 | 1364 | | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
1367 | 1376 | | |
1368 | 1377 | | |
1369 | 1378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
831 | 831 | | |
832 | 832 | | |
833 | 833 | | |
834 | | - | |
835 | 834 | | |
836 | 835 | | |
837 | 836 | | |
| |||
876 | 875 | | |
877 | 876 | | |
878 | 877 | | |
879 | | - | |
| 878 | + | |
880 | 879 | | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
881 | 884 | | |
882 | 885 | | |
883 | 886 | | |
| |||
0 commit comments