Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ee3a551

Browse filesBrowse files
committed
Fix incorrect logic in plan dependency recording
Both 50e17ad and 29f45e2 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. 50e17ad made this mistake first, then in v15 29f45e2 copied the same mistake. Reported-by: Tom Lane Backpatch-through: 14, where 50e17ad first made this mistake Discussion: https://postgr.es/m/2277537.1694301772@sss.pgh.pa.us
1 parent f062cdd commit ee3a551
Copy full SHA for ee3a551

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎src/backend/optimizer/plan/setrefs.c‎

Copy file name to clipboardExpand all lines: src/backend/optimizer/plan/setrefs.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1991,10 +1991,10 @@ fix_expr_common(PlannerInfo *root, Node *node)
19911991
set_sa_opfuncid(saop);
19921992
record_plan_function_dependency(root, saop->opfuncid);
19931993

1994-
if (!OidIsValid(saop->hashfuncid))
1994+
if (OidIsValid(saop->hashfuncid))
19951995
record_plan_function_dependency(root, saop->hashfuncid);
19961996

1997-
if (!OidIsValid(saop->negfuncid))
1997+
if (OidIsValid(saop->negfuncid))
19981998
record_plan_function_dependency(root, saop->negfuncid);
19991999
}
20002000
else if (IsA(node, Const))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.