Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> explain select
> (select r.n from r where r.p=tv.p), -- no reference to gn!
> sum(x)
> From
> tv
What's your point? We can't omit the join to g, as that would change
the set of returned rows. (In general, anyway; in this case the
dependency is that multiple matches in g would change sum(x) for
any given r.n.)
regards, tom lane