forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1da162e
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 parent806d08c commit1da162e
2 files changed
+39
-20
lines changedLines changed: 6 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1399 | 1399 |
| |
1400 | 1400 |
| |
1401 | 1401 |
| |
1402 |
| - | |
1403 |
| - | |
1404 |
| - | |
1405 |
| - | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
1406 | 1408 |
| |
1407 | 1409 |
| |
1408 | 1410 |
| |
|
Lines changed: 33 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
451 | 451 |
| |
452 | 452 |
| |
453 | 453 |
| |
454 |
| - | |
| 454 | + | |
455 | 455 |
| |
456 | 456 |
| |
457 | 457 |
| |
| |||
11570 | 11570 |
| |
11571 | 11571 |
| |
11572 | 11572 |
| |
11573 |
| - | |
| 11573 | + | |
| 11574 | + | |
| 11575 | + | |
| 11576 | + | |
| 11577 | + | |
| 11578 | + | |
| 11579 | + | |
11574 | 11580 |
| |
| 11581 | + | |
| 11582 | + | |
11575 | 11583 |
| |
11576 | 11584 |
| |
11577 | 11585 |
| |
11578 | 11586 |
| |
11579 | 11587 |
| |
11580 | 11588 |
| |
11581 |
| - | |
| 11589 | + | |
11582 | 11590 |
| |
11583 | 11591 |
| |
11584 | 11592 |
| |
| |||
11597 | 11605 |
| |
11598 | 11606 |
| |
11599 | 11607 |
| |
11600 |
| - | |
11601 |
| - | |
11602 |
| - | |
| 11608 | + | |
| 11609 | + | |
| 11610 | + | |
| 11611 | + | |
| 11612 | + | |
| 11613 | + | |
| 11614 | + | |
| 11615 | + | |
| 11616 | + | |
| 11617 | + | |
| 11618 | + | |
| 11619 | + | |
| 11620 | + | |
11603 | 11621 |
| |
11604 |
| - | |
11605 |
| - | |
11606 |
| - | |
11607 |
| - | |
| 11622 | + | |
| 11623 | + | |
| 11624 | + | |
| 11625 | + | |
| 11626 | + | |
| 11627 | + | |
11608 | 11628 |
| |
11609 | 11629 |
| |
11610 |
| - | |
11611 |
| - | |
11612 |
| - | |
11613 |
| - | |
11614 |
| - | |
11615 |
| - | |
| 11630 | + | |
| 11631 | + | |
| 11632 | + | |
11616 | 11633 |
| |
11617 | 11634 |
| |
11618 | 11635 |
| |
|
0 commit comments
Comments
(0)