• T
    Restructure handling of inheritance queries so that they work with outer · 6543d81d
    Tom Lane 提交于
    joins, and clean things up a good deal at the same time.  Append plan node
    no longer hacks on rangetable at runtime --- instead, all child tables are
    given their own RT entries during planning.  Concept of multiple target
    tables pushed up into execMain, replacing bug-prone implementation within
    nodeAppend.  Planner now supports generating Append plans for inheritance
    sets either at the top of the plan (the old way) or at the bottom.  Expanding
    at the bottom is appropriate for tables used as sources, since they may
    appear inside an outer join; but we must still expand at the top when the
    target of an UPDATE or DELETE is an inheritance set, because we actually need
    a different targetlist and junkfilter for each target table in that case.
    Fortunately a target table can't be inside an outer join...  Bizarre mutual
    recursion between union_planner and prepunion.c is gone --- in fact,
    union_planner doesn't really have much to do with union queries anymore,
    so I renamed it grouping_planner.
    6543d81d
equalfuncs.c 42.3 KB