forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit8028e29
committed
Detect overflow in timestamp[tz] subtraction.
It's possible to overflow the int64 microseconds field of theoutput interval when subtracting two timestamps. Detect thatinstead of silently returning a bogus result.Nick BabadzhanianDiscussion:https://postgr.es/m/CABw73Uq2oJ3E+kYvvDuY04EkhhkChim2e-PaghBDjOmgUAMWGw@mail.gmail.com1 parentf0d0394 commit8028e29
File tree
5 files changed
+30
-1
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
5 files changed
+30
-1
lines changedLines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2713 | 2713 |
| |
2714 | 2714 |
| |
2715 | 2715 |
| |
2716 |
| - | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
2717 | 2720 |
| |
2718 | 2721 |
| |
2719 | 2722 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1207 | 1207 |
| |
1208 | 1208 |
| |
1209 | 1209 |
| |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
1210 | 1219 |
| |
1211 | 1220 |
| |
1212 | 1221 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1331 | 1331 |
| |
1332 | 1332 |
| |
1333 | 1333 |
| |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
1334 | 1343 |
| |
1335 | 1344 |
| |
1336 | 1345 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
326 | 326 |
| |
327 | 327 |
| |
328 | 328 |
| |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
329 | 333 |
| |
330 | 334 |
| |
331 | 335 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
306 | 306 |
| |
307 | 307 |
| |
308 | 308 |
| |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
309 | 313 |
| |
310 | 314 |
| |
311 | 315 |
| |
|
0 commit comments
Comments
(0)