Compare varnullingrels too in assign_param_for_var().

Oversight in 2489d76c4.  Preliminary analysis suggests that the
problem may be unreachable --- but if we did have instances of
the same column with different varnullingrels, we'd surely need
to treat them as different Params.

Discussion: https://postgr.es/m/412552.1706203379@sss.pgh.pa.us
This commit is contained in:
Tom Lane 2024-01-26 15:54:17 -05:00
parent 25cd2d6402
commit 5e444a2526
1 changed files with 2 additions and 1 deletions

View File

@ -90,7 +90,8 @@ assign_param_for_var(PlannerInfo *root, Var *var)
pvar->varattno == var->varattno &&
pvar->vartype == var->vartype &&
pvar->vartypmod == var->vartypmod &&
pvar->varcollid == var->varcollid)
pvar->varcollid == var->varcollid &&
bms_equal(pvar->varnullingrels, var->varnullingrels))
return pitem->paramId;
}
}