Tomas Vondra <tomas.von...@enterprisedb.com> writes: > On 3/4/21 4:16 PM, Tom Lane wrote: >> Hmm, do we really have any places that include OUTER_VAR etc in >> bitmapsets? They shouldn't appear in relid sets, for sure. >> I agree though that if they did, this would have bad performance >> consequences.
> Hmmm, I don't know. I mostly assumed that if I do pull_varnos() it would > include those values. But maybe that's not supposed to happen. But (IIRC) those varnos are never used till setrefs.c fixes up the plan to replace normal Vars with references to lower plan nodes' outputs. I'm not sure why anyone would be doing pull_varnos() after that; it would not give very meaningful results. regards, tom lane