diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2022-10-24 12:52:43 +0200 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2022-10-24 12:52:43 +0200 |
commit | fb2a83b2b750a32ddfd107a75a3bc173f4f0a81f (patch) | |
tree | c509bb1109ab06e6d50812b0c8771e22657e9eea /src/backend/optimizer/path/indxpath.c | |
parent | 4a6de748d3429cfa081942c46411d62341867bfd (diff) | |
download | postgresql-fb2a83b2b750a32ddfd107a75a3bc173f4f0a81f.tar.gz postgresql-fb2a83b2b750a32ddfd107a75a3bc173f4f0a81f.zip |
Update some comments that should've covered MERGE
Oversight in 7103ebb7aae8. Backpatch to 15.
Author: Richard Guo <guofenglinux@gmail.com>
Discussion: https://postgr.es/m/CAMbWs48gnDjZXq3-b56dVpQCNUJ5hD9kdtWN4QFwKCEapspNsA@mail.gmail.com
Diffstat (limited to 'src/backend/optimizer/path/indxpath.c')
-rw-r--r-- | src/backend/optimizer/path/indxpath.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index 0ef70ad7f11..b8000da56d9 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -3378,12 +3378,13 @@ check_index_predicates(PlannerInfo *root, RelOptInfo *rel) * Normally we remove quals that are implied by a partial index's * predicate from indrestrictinfo, indicating that they need not be * checked explicitly by an indexscan plan using this index. However, if - * the rel is a target relation of UPDATE/DELETE/SELECT FOR UPDATE, we - * cannot remove such quals from the plan, because they need to be in the - * plan so that they will be properly rechecked by EvalPlanQual testing. - * Some day we might want to remove such quals from the main plan anyway - * and pass them through to EvalPlanQual via a side channel; but for now, - * we just don't remove implied quals at all for target relations. + * the rel is a target relation of UPDATE/DELETE/MERGE/SELECT FOR UPDATE, + * we cannot remove such quals from the plan, because they need to be in + * the plan so that they will be properly rechecked by EvalPlanQual + * testing. Some day we might want to remove such quals from the main + * plan anyway and pass them through to EvalPlanQual via a side channel; + * but for now, we just don't remove implied quals at all for target + * relations. */ is_target_rel = (bms_is_member(rel->relid, root->all_result_relids) || get_plan_rowmark(root->rowMarks, rel->relid) != NULL); |