On Sat, 4 Oct 2025 at 03:04, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> This change in substitute_phv_relids_walker is *not* safe according
> to the routine's head comment:
Oh right. I'll leave that one.
> The change in generate_union_paths is obviously safe, though, since
> that "relids" is entirely locally built.
>
> I'm not convinced one way or the other about changing
> markNullableIfNeeded. I can't offhand think of a reason why
> a Var would be sharing varnullingrels with some other node
> at this point in the proceedings. However, the comment
> suggests that varnullingrels is probably NULL anyway, so that
> there's nothing to be gained.
I mainly wanted to adjust the generate_union_paths() one which was
just above where I had been hacking on the UNION short-circuiting
work. Coming here was mostly an effort in due diligence to find
locations making the same mistake. I think this might be enough due
diligence, so I'll just go and modify the generate_union_paths() and
leave the markNullableIfNeeded() alone.
Thanks for looking.
David