I wrote: > Amit Langote <langote_amit...@lab.ntt.co.jp> writes: >> About the XXX: I think resetting inh flag is unnecessary, so we should >> just remove the line.
> Possibly. I hadn't had time to follow up the XXX annotation. Now I have ... Yeah, it seems we can just drop that and leave the flag alone. We'll end up running through set_append_rel_size and finding no relevant AppendRelInfos, but that's not going to take long enough to be a problem. It seems better to have the principle that rte->inh doesn't change after subquery_planner's initial scan of the rtable, so I'll make it so. >> If we do that, we can also get rid of the following >> code in set_rel_size(): No, we can't --- that's still reachable if somebody says "SELECT FROM ONLY partitioned_table". regards, tom lane