Commit da02101
committed
Add overflow checks to int4 and int8 versions of generate_series().
The previous code went into an infinite loop after overflow. In fact,
an overflow is not really an error; it just means that the current
value is the last one we need to return. So, just arrange to stop
immediately when overflow is detected.
Back-patch all the way.1 parent 1907dca commit da02101
2 files changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1410 | 1410 | | |
1411 | 1411 | | |
1412 | 1412 | | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
1413 | 1417 | | |
1414 | 1418 | | |
1415 | 1419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1230 | 1230 | | |
1231 | 1231 | | |
1232 | 1232 | | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
1233 | 1237 | | |
1234 | 1238 | | |
1235 | 1239 | | |
| |||
0 commit comments