• Tom Lane's avatar
    Restructure planner's handling of inheritance. Rather than processing · 8a1468af
    Tom Lane authored
    inheritance trees on-the-fly, which pretty well constrained us to considering
    only one way of planning inheritance, expand inheritance sets during the
    planner prep phase, and build a side data structure that can be consulted
    later to find which RTEs are members of which inheritance sets.  As proof of
    concept, use the data structure to plan joins against inheritance sets more
    efficiently: we can now use indexes on the set members in inner-indexscan
    joins.  (The generated plans could be improved further, but it'll take some
    executor changes.)  This data structure will also support handling UNION ALL
    subqueries in the same way as inheritance sets, but that aspect of it isn't
    finished yet.
    8a1468af
copyfuncs.c 62.2 KB