diff options
author | Andrew Gierth <rhodiumtoad@postgresql.org> | 2018-05-21 17:02:17 +0100 |
---|---|---|
committer | Andrew Gierth <rhodiumtoad@postgresql.org> | 2018-05-21 17:31:01 +0100 |
commit | cf516dc9d69052360f1de390636c220797120d28 (patch) | |
tree | ee9b66991440ac3ab2f92a3a67db5ba1bdc055d4 /src/backend/executor/nodeModifyTable.c | |
parent | 28782d7e3b923a9eb9e1063c6e3cc69e167fad11 (diff) | |
download | postgresql-cf516dc9d69052360f1de390636c220797120d28.tar.gz postgresql-cf516dc9d69052360f1de390636c220797120d28.zip |
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/877enz476l.fsf@news-spur.riddles.org.uk
Discussion: http://postgr.es/m/152647780335.27204.16895288237122418685@wrigleys.postgresql.org
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions