Get rid of adjust_appendrel_attr_needed(), which has been broken ever since
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 11 Nov 2008 18:13:44 +0000 (18:13 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 11 Nov 2008 18:13:44 +0000 (18:13 +0000)
commitf2cc1df534d42aa5dd8dbab0b27f0df5fb52fe4f
treecadceb92450c278e2eab0a2a3783d9e84e2669a7
parent42ba54e4c311f4eaf90f017b08e4bbe4f357e4d3
Get rid of adjust_appendrel_attr_needed(), which has been broken ever since
we extended the appendrel mechanism to support UNION ALL optimization.  The
reason nobody noticed was that we are not actually using attr_needed data for
appendrel children; hence it seems more reasonable to rip it out than fix it.
Back-patch to 8.2 because an Assert failure is possible in corner cases.
Per examination of an example from Jim Nasby.

In HEAD, also get rid of AppendRelInfo.col_mappings, which is quite inadequate
to represent UNION ALL situations; depend entirely on translated_vars instead.
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/prep/prepunion.c
src/include/optimizer/prep.h