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.
Showing
- src/backend/nodes/copyfuncs.c 1 addition, 2 deletionssrc/backend/nodes/copyfuncs.c
- src/backend/nodes/equalfuncs.c 1 addition, 2 deletionssrc/backend/nodes/equalfuncs.c
- src/backend/nodes/outfuncs.c 1 addition, 2 deletionssrc/backend/nodes/outfuncs.c
- src/backend/optimizer/path/allpaths.c 6 additions, 8 deletionssrc/backend/optimizer/path/allpaths.c
- src/backend/optimizer/prep/prepjointree.c 12 additions, 17 deletionssrc/backend/optimizer/prep/prepjointree.c
- src/backend/optimizer/prep/prepunion.c 21 additions, 93 deletionssrc/backend/optimizer/prep/prepunion.c
- src/include/nodes/relation.h 3 additions, 16 deletionssrc/include/nodes/relation.h
- src/include/optimizer/prep.h 1 addition, 6 deletionssrc/include/optimizer/prep.h
Loading
Please register or sign in to comment