mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
WITH TIES: number of rows is optional and defaults to one
FETCH FIRST .. ONLY implements this correctly, but we missed to include
it for FETCH FIRST .. WITH TIES in commit 357889eb17
.
Author: Vik Fearing
Discussion: https://postgr.es/m/6aa690ef-551d-e24f-2690-c38c2442947c@postgresfriends.org
This commit is contained in:
@ -11816,6 +11816,14 @@ limit_clause:
|
||||
n->limitOption = LIMIT_OPTION_COUNT;
|
||||
$$ = n;
|
||||
}
|
||||
| FETCH first_or_next row_or_rows WITH TIES
|
||||
{
|
||||
SelectLimit *n = (SelectLimit *) palloc(sizeof(SelectLimit));
|
||||
n->limitOffset = NULL;
|
||||
n->limitCount = makeIntConst(1, -1);
|
||||
n->limitOption = LIMIT_OPTION_WITH_TIES;
|
||||
$$ = n;
|
||||
}
|
||||
;
|
||||
|
||||
offset_clause:
|
||||
|
Reference in New Issue
Block a user