| From: | Andrew Gierth <rhodiumtoad(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix SQL:2008 FETCH FIRST syntax to allow parameters. |
| Date: | 2018-05-21 16:34:54 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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 as
literals. When this syntax was added all those years ago, it was done
inconsistently, with <x> and <y> being different subsets of the
standard syntax.
Rectify that by making <x> and <y> accept the same thing, and allowing
either a (signed) numeric literal or a c_expr there, which allows for
parameters, 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/[email protected]
Discussion: http://postgr.es/m/[email protected]
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/cf516dc9d69052360f1de390636c220797120d28
Modified Files
--------------
doc/src/sgml/ref/select.sgml | 14 +++++++------
src/backend/parser/gram.y | 49 +++++++++++++++++++++++++++++---------------
2 files changed, 41 insertions(+), 22 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2018-05-21 16:37:29 | pgsql: Doc: preliminary list of PG11 major features. |
| Previous Message | Peter Eisentraut | 2018-05-21 16:30:17 | pgsql: Translation updates |