Fix parse_agg.c to detect ungrouped Vars in sub-SELECTs; remove code
Tom Lane <tgl@sss.pgh.pa.us>
Fix parse_agg.c to detect ungrouped Vars in sub-SELECTs; remove code that used to do it in planner. That was an ancient kluge that was never satisfactory; errors should be detected at parse time when possible. But at the time we didn't have the support mechanism (expression_tree_walker et al) to make it convenient to do in the parser.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/plan/planner.c | modified | +1 −12 |
| src/backend/optimizer/util/clauses.c | modified | +1 −163 |
| src/backend/parser/analyze.c | modified | +12 −12 |
| src/backend/parser/parse_agg.c | modified | +89 −36 |
| src/include/optimizer/clauses.h | modified | +1 −2 |
| src/include/parser/parse_agg.h | modified | +3 −4 |