Robert Haas <robertmhaas@gmail.com> writes:
> I was not aware of outer_join_rels, so thank you for pointing it out.
> However, consider this query:
> select 1 from pg_class a inner join pg_class b on a.relfilenode = b.relfilenode;
> Here, we end up with a three-item range table: one for a, one for b,
> and one for the join. But the join is not an outer join, and does not
> appear in root->outer_join_rels. Therefore, I'm not sure we can rely
> on outer_join_rels in this scenario.
Plain (not-outer) joins will never be included in a relid set in the
first place.
regards, tom lane