mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-02 02:51:15 +02:00
Fix incorrect logic in plan dependency recording
Both50e17ad28
and29f45e299
mistakenly tried to record a plan dependency on a function but mistakenly inverted the OidIsValid test. This meant that we'd record a dependency only when the function's Oid was InvalidOid. Clearly this was meant to *not* record the dependency in that case.50e17ad28
made this mistake first, then in v1529f45e299
copied the same mistake. Reported-by: Tom Lane Backpatch-through: 14, where50e17ad28
first made this mistake Discussion: https://postgr.es/m/2277537.1694301772@sss.pgh.pa.us
This commit is contained in:
parent
a81e5516fa
commit
1a6900e58a
@ -1979,10 +1979,10 @@ fix_expr_common(PlannerInfo *root, Node *node)
|
||||
set_sa_opfuncid(saop);
|
||||
record_plan_function_dependency(root, saop->opfuncid);
|
||||
|
||||
if (!OidIsValid(saop->hashfuncid))
|
||||
if (OidIsValid(saop->hashfuncid))
|
||||
record_plan_function_dependency(root, saop->hashfuncid);
|
||||
|
||||
if (!OidIsValid(saop->negfuncid))
|
||||
if (OidIsValid(saop->negfuncid))
|
||||
record_plan_function_dependency(root, saop->negfuncid);
|
||||
}
|
||||
else if (IsA(node, Const))
|
||||
|
Loading…
Reference in New Issue
Block a user