Commit 2704898
committed
Re-enable error for "SELECT ... OFFSET -1".
The executor has thrown errors for negative OFFSET values since 8.4 (see
commit bfce56e), but in a moment of brain
fade I taught the planner that OFFSET with a constant negative value was a
no-op (commit 1a1832e). Reinstate the
former behavior by only discarding OFFSET with a value of exactly 0. In
passing, adjust a planner comment that referenced the ancient behavior.
Back-patch to 9.3 where the mistake was introduced.1 parent 27cef0a commit 2704898
1 file changed
+3
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2335 | 2335 | | |
2336 | 2336 | | |
2337 | 2337 | | |
2338 | | - | |
| 2338 | + | |
2339 | 2339 | | |
2340 | 2340 | | |
2341 | 2341 | | |
| |||
2496 | 2496 | | |
2497 | 2497 | | |
2498 | 2498 | | |
2499 | | - | |
2500 | | - | |
2501 | | - | |
| 2499 | + | |
| 2500 | + | |
2502 | 2501 | | |
2503 | 2502 | | |
2504 | 2503 | | |
| |||
0 commit comments