pgsql: Avoid mislabeling of lateral references, redux.

2024-11-30 Thread Tom Lane
Avoid mislabeling of lateral references, redux. As I'd feared, commit 5c9d8636d was still a few bricks shy of a load. We can't just leave pulled-up lateral-reference Vars with no new nullingrels: we have to carefully compute what subset of the to-be-replaced Var's nullingrels apply to them, else w

pgsql: Avoid mislabeling of lateral references, redux.

2024-11-30 Thread Tom Lane
Avoid mislabeling of lateral references, redux. As I'd feared, commit 5c9d8636d was still a few bricks shy of a load. We can't just leave pulled-up lateral-reference Vars with no new nullingrels: we have to carefully compute what subset of the to-be-replaced Var's nullingrels apply to them, else w

pgsql: Avoid mislabeling of lateral references, redux.

2024-11-30 Thread Tom Lane
Avoid mislabeling of lateral references, redux. As I'd feared, commit 5c9d8636d was still a few bricks shy of a load. We can't just leave pulled-up lateral-reference Vars with no new nullingrels: we have to carefully compute what subset of the to-be-replaced Var's nullingrels apply to them, else w