postgresql/src/include/nodes
Tom Lane 8e617e29aa Fix whole-row Var evaluation to cope with resjunk columns (again).
When a whole-row Var is reading the result of a subquery, we need it to
ignore any "resjunk" columns that the subquery might have evaluated for
GROUP BY or ORDER BY purposes.  We've hacked this area before, in commit
68e40998d0, but that fix only covered
whole-row Vars of named composite types, not those of RECORD type; and it
was mighty klugy anyway, since it just assumed without checking that any
extra columns in the result must be resjunk.  A proper fix requires getting
hold of the subquery's targetlist so we can actually see which columns are
resjunk (whereupon we can use a JunkFilter to get rid of them).  So bite
the bullet and add some infrastructure to make that possible.

Per report from Andrew Dunstan and additional testing by Merlin Moncure.
Back-patch to all supported branches.  In 8.3, also back-patch commit
292176a118, which for some reason I had
not done at the time, but it's a prerequisite for this change.
2012-07-20 13:10:58 -04:00
..
bitmapset.h Use parameterized paths to generate inner indexscans more flexibly. 2012-01-27 19:26:38 -05:00
execnodes.h Fix whole-row Var evaluation to cope with resjunk columns (again). 2012-07-20 13:10:58 -04:00
makefuncs.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
memnodes.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
nodeFuncs.h Code review for protransform patches. 2012-03-23 17:29:57 -04:00
nodes.h Fix whole-row Var evaluation to cope with resjunk columns (again). 2012-07-20 13:10:58 -04:00
params.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
parsenodes.h Syntax support and documentation for event triggers. 2012-07-18 10:16:16 -04:00
pg_list.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
plannodes.h Add some infrastructure for contrib/pg_stat_statements. 2012-03-27 15:17:40 -04:00
primnodes.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
print.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
readfuncs.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
relation.h Run pgindent on 9.2 source tree in preparation for first 9.3 2012-06-10 15:20:04 -04:00
replnodes.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
tidbitmap.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00
value.h Update copyright notices for year 2012. 2012-01-01 18:01:58 -05:00