pgsql: Fix wrong order of operations in inheritance_planner.

2018-08-11 Thread Tom Lane
Fix wrong order of operations in inheritance_planner. When considering a partitioning parent rel, we should stop processing that subroot as soon as we've done adjust_appendrel_attrs and any securityQuals updates. The rest of this is unnecessary, and indeed adding duplicate subquery RTEs to the su

pgsql: Fix wrong order of operations in inheritance_planner.

2018-08-11 Thread Tom Lane
Fix wrong order of operations in inheritance_planner. When considering a partitioning parent rel, we should stop processing that subroot as soon as we've done adjust_appendrel_attrs and any securityQuals updates. The rest of this is unnecessary, and indeed adding duplicate subquery RTEs to the su