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 | 3b2db22fe287d17ecb0ba4cd828dc7900dddd03f (patch) | |
tree | 25254ec152e7c13cd94a8a6aa072b40c2e54d66f /src/backend/optimizer/path/indxpath.c | |
parent | 8328a15f8f95cad3fa99bbab551cade0a8403708 (diff) | |
download | postgresql-3b2db22fe287d17ecb0ba4cd828dc7900dddd03f.tar.gz postgresql-3b2db22fe287d17ecb0ba4cd828dc7900dddd03f.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 c31fcc917df..77f3f81bcb6 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -3393,12 +3393,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); |