forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcf516dc
committed
Fix SQL:2008 FETCH FIRST syntax to allow parameters.
OFFSET <x> ROWS FETCH FIRST <y> ROWS ONLY syntax is supposed to accept<simple value specification>, which includes parameters as well asliterals. When this syntax was added all those years ago, it was doneinconsistently, with <x> and <y> being different subsets of thestandard syntax.Rectify that by making <x> and <y> accept the same thing, and allowingeither a (signed) numeric literal or a c_expr there, which allows forparameters, variables, and parenthesized arbitrary expressions.Per bug #15200 from Lukas Eder.Backpatch all the way, since this has been broken from the start.Discussion:https://postgr.es/m/877enz476l.fsf@news-spur.riddles.org.ukDiscussion:http://postgr.es/m/152647780335.27204.16895288237122418685@wrigleys.postgresql.org1 parent28782d7 commitcf516dc
2 files changed
+41
-22
lines changedLines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1349 | 1349 |
| |
1350 | 1350 |
| |
1351 | 1351 |
| |
1352 |
| - | |
1353 |
| - | |
1354 |
| - | |
1355 |
| - | |
1356 |
| - | |
1357 |
| - | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
1358 | 1360 |
| |
1359 | 1361 |
| |
1360 | 1362 |
| |
|
Lines changed: 33 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
447 | 447 |
| |
448 | 448 |
| |
449 | 449 |
| |
450 |
| - | |
| 450 | + | |
451 | 451 |
| |
452 | 452 |
| |
453 | 453 |
| |
| |||
11185 | 11185 |
| |
11186 | 11186 |
| |
11187 | 11187 |
| |
11188 |
| - | |
| 11188 | + | |
| 11189 | + | |
| 11190 | + | |
| 11191 | + | |
| 11192 | + | |
| 11193 | + | |
| 11194 | + | |
11189 | 11195 |
| |
| 11196 | + | |
| 11197 | + | |
11190 | 11198 |
| |
11191 | 11199 |
| |
11192 | 11200 |
| |
11193 | 11201 |
| |
11194 | 11202 |
| |
11195 | 11203 |
| |
11196 |
| - | |
| 11204 | + | |
11197 | 11205 |
| |
11198 | 11206 |
| |
11199 | 11207 |
| |
| |||
11212 | 11220 |
| |
11213 | 11221 |
| |
11214 | 11222 |
| |
11215 |
| - | |
11216 |
| - | |
11217 |
| - | |
| 11223 | + | |
| 11224 | + | |
| 11225 | + | |
| 11226 | + | |
| 11227 | + | |
| 11228 | + | |
| 11229 | + | |
| 11230 | + | |
| 11231 | + | |
| 11232 | + | |
| 11233 | + | |
| 11234 | + | |
| 11235 | + | |
11218 | 11236 |
| |
11219 |
| - | |
11220 |
| - | |
11221 |
| - | |
11222 |
| - | |
| 11237 | + | |
| 11238 | + | |
| 11239 | + | |
| 11240 | + | |
| 11241 | + | |
| 11242 | + | |
11223 | 11243 |
| |
11224 | 11244 |
| |
11225 |
| - | |
11226 |
| - | |
11227 |
| - | |
11228 |
| - | |
11229 |
| - | |
11230 |
| - | |
| 11245 | + | |
| 11246 | + | |
| 11247 | + | |
11231 | 11248 |
| |
11232 | 11249 |
| |
11233 | 11250 |
| |
|
0 commit comments
Comments
(0)