forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7a0aa8d
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 parent1545ca9 commit7a0aa8d
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 | |
---|---|---|---|
| |||
419 | 419 |
| |
420 | 420 |
| |
421 | 421 |
| |
422 |
| - | |
| 422 | + | |
423 | 423 |
| |
424 | 424 |
| |
425 | 425 |
| |
| |||
10414 | 10414 |
| |
10415 | 10415 |
| |
10416 | 10416 |
| |
10417 |
| - | |
| 10417 | + | |
| 10418 | + | |
| 10419 | + | |
| 10420 | + | |
| 10421 | + | |
| 10422 | + | |
| 10423 | + | |
10418 | 10424 |
| |
| 10425 | + | |
| 10426 | + | |
10419 | 10427 |
| |
10420 | 10428 |
| |
10421 | 10429 |
| |
10422 | 10430 |
| |
10423 | 10431 |
| |
10424 | 10432 |
| |
10425 |
| - | |
| 10433 | + | |
10426 | 10434 |
| |
10427 | 10435 |
| |
10428 | 10436 |
| |
| |||
10441 | 10449 |
| |
10442 | 10450 |
| |
10443 | 10451 |
| |
10444 |
| - | |
10445 |
| - | |
10446 |
| - | |
| 10452 | + | |
| 10453 | + | |
| 10454 | + | |
| 10455 | + | |
| 10456 | + | |
| 10457 | + | |
| 10458 | + | |
| 10459 | + | |
| 10460 | + | |
| 10461 | + | |
| 10462 | + | |
| 10463 | + | |
| 10464 | + | |
10447 | 10465 |
| |
10448 |
| - | |
10449 |
| - | |
10450 |
| - | |
10451 |
| - | |
| 10466 | + | |
| 10467 | + | |
| 10468 | + | |
| 10469 | + | |
| 10470 | + | |
| 10471 | + | |
10452 | 10472 |
| |
10453 | 10473 |
| |
10454 |
| - | |
10455 |
| - | |
10456 |
| - | |
10457 |
| - | |
10458 |
| - | |
10459 |
| - | |
| 10474 | + | |
| 10475 | + | |
| 10476 | + | |
10460 | 10477 |
| |
10461 | 10478 |
| |
10462 | 10479 |
| |
|
0 commit comments
Comments
(0)