forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit955089d
committed
Fix daterange canonicalization for +/- infinity.
The values 'infinity' and '-infinity' are a part of the DATE typeitself, so a bound of the date 'infinity' is not the same as anunbounded/infinite range. However, it is still wrong to try tocanonicalize such values, because adding or subtracting one has noeffect. Fix by treating 'infinity' and '-infinity' the same asunbounded ranges for the purposes of canonicalization (but not otherpurposes).Backpatch to all versions because it is inconsistent with thedocumented behavior. Note that this could be an incompatibility forapplications relying on the behavior contrary to the documentation.Author: Laurenz AlbeReviewed-by: Thomas MunroDiscussion:https://postgr.es/m/77f24ea19ab802bc9bc60ddbb8977ee2d646aec1.camel%40cybertec.atBackpatch-through: 9.41 parent53256e8 commit955089d
File tree
3 files changed
+30
-2
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+30
-2
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1366 | 1366 |
| |
1367 | 1367 |
| |
1368 | 1368 |
| |
1369 |
| - | |
| 1369 | + | |
1370 | 1370 |
| |
1371 | 1371 |
| |
1372 | 1372 |
| |
1373 | 1373 |
| |
1374 | 1374 |
| |
1375 |
| - | |
| 1375 | + | |
1376 | 1376 |
| |
1377 | 1377 |
| |
1378 | 1378 |
| |
|
Lines changed: 24 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
652 | 652 |
| |
653 | 653 |
| |
654 | 654 |
| |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
655 | 679 |
| |
656 | 680 |
| |
657 | 681 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
168 | 172 |
| |
169 | 173 |
| |
170 | 174 |
| |
|
0 commit comments
Comments
(0)