aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/util/relnode.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-05-18 10:39:16 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-05-18 10:39:16 -0400
commit8a2523ff354077180084b43a04be01f10aafdb8c (patch)
treecae619c226ee1331a4758e462b57845008a246f5 /src/backend/optimizer/util/relnode.c
parent1c634f6647c28354258d114041252475325aea32 (diff)
downloadpostgresql-8a2523ff354077180084b43a04be01f10aafdb8c.tar.gz
postgresql-8a2523ff354077180084b43a04be01f10aafdb8c.zip
Tweak API of new function clause_is_computable_at().
Pass it the RestrictInfo under consideration, not just the clause_relids. This should save some trivial amount of code at the call sites, and it gives us more flexibility about what clause_is_computable_at() does. There's no actual functional change here, though. Discussion: https://postgr.es/m/3564467.1684352557@sss.pgh.pa.us
Diffstat (limited to 'src/backend/optimizer/util/relnode.c')
-rw-r--r--src/backend/optimizer/util/relnode.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/optimizer/util/relnode.c b/src/backend/optimizer/util/relnode.c
index 8d5f7c5e8dd..04ea04b5b64 100644
--- a/src/backend/optimizer/util/relnode.c
+++ b/src/backend/optimizer/util/relnode.c
@@ -1346,8 +1346,7 @@ subbuild_joinrel_restrictlist(PlannerInfo *root,
Assert(!RINFO_IS_PUSHED_DOWN(rinfo, joinrel->relids));
if (!bms_is_subset(rinfo->required_relids, both_input_relids))
continue;
- if (!clause_is_computable_at(root, rinfo->clause_relids,
- both_input_relids))
+ if (!clause_is_computable_at(root, rinfo, both_input_relids))
continue;
}
else
@@ -1358,13 +1357,13 @@ subbuild_joinrel_restrictlist(PlannerInfo *root,
*/
#ifdef USE_ASSERT_CHECKING
if (RINFO_IS_PUSHED_DOWN(rinfo, joinrel->relids))
- Assert(clause_is_computable_at(root, rinfo->clause_relids,
+ Assert(clause_is_computable_at(root, rinfo,
joinrel->relids));
else
{
Assert(bms_is_subset(rinfo->required_relids,
both_input_relids));
- Assert(clause_is_computable_at(root, rinfo->clause_relids,
+ Assert(clause_is_computable_at(root, rinfo,
both_input_relids));
}
#endif