Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Another choice I considered was subquery_planner: in the spot where
> expand_inherited_tables() is called, add a new call to expand the RTEs
> that correspond to tables containing stores. But I had second thoughts
> because that function says "it's safe because it only adds baserels, not
> joins", and I'm adding joins.
I think that comment is only justifying why we don't need to redetermine
hasJoinRTEs/hasLateralRTEs/hasOuterJoins afterwards.
regards, tom lane