mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Update some comments that should've covered MERGE
Oversight in 7103ebb7aa
. Backpatch to 15.
Author: Richard Guo <guofenglinux@gmail.com>
Discussion: https://postgr.es/m/CAMbWs48gnDjZXq3-b56dVpQCNUJ5hD9kdtWN4QFwKCEapspNsA@mail.gmail.com
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user