Do honest transformation and preprocessing of LIMIT/OFFSET clauses,
Tom Lane <tgl@sss.pgh.pa.us>
Do honest transformation and preprocessing of LIMIT/OFFSET clauses, instead of the former kluge whereby gram.y emitted already-transformed expressions. This is needed so that Params appearing in these clauses actually work correctly. I suppose some might claim that the side effect of 'SELECT ... LIMIT 2+2' working is a new feature, but I say this is a bug fix.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/plan/planner.c | modified | +8 −2 |
| src/backend/optimizer/util/clauses.c | modified | +7 −1 |
| src/backend/parser/analyze.c | modified | +18 −11 |
| src/backend/parser/gram.y | modified | +10 −58 |
| src/backend/parser/parse_clause.c | modified | +57 −8 |
| src/backend/parser/parse_coerce.c | modified | +42 −3 |
| src/include/parser/parse_clause.h | modified | +5 −2 |
| src/include/parser/parse_coerce.h | modified | +3 −1 |