Lines Matching refs:erm

76 		ExecRowMark *erm = aerm->rowmark;  in ExecLockRows()  local
88 testTuple = &(node->lr_curtuples[erm->rti - 1]); in ExecLockRows()
94 if (erm->rti != erm->prti) in ExecLockRows()
106 Assert(OidIsValid(erm->relid)); in ExecLockRows()
107 if (tableoid != erm->relid) in ExecLockRows()
110 erm->ermActive = false; in ExecLockRows()
111 ItemPointerSetInvalid(&(erm->curCtid)); in ExecLockRows()
115 erm->ermActive = true; in ExecLockRows()
126 if (erm->relation->rd_rel->relkind == RELKIND_FOREIGN_TABLE) in ExecLockRows()
131 fdwroutine = GetFdwRoutineForRelation(erm->relation, false); in ExecLockRows()
137 RelationGetRelationName(erm->relation)))); in ExecLockRows()
139 erm, in ExecLockRows()
163 switch (erm->markType) in ExecLockRows()
183 test = heap_lock_tuple(erm->relation, &tuple, in ExecLockRows()
185 lockmode, erm->waitPolicy, true, in ExecLockRows()
228 copyTuple = EvalPlanQualFetch(estate, erm->relation, in ExecLockRows()
229 lockmode, erm->waitPolicy, in ExecLockRows()
261 erm->curCtid = tuple.t_self; in ExecLockRows()
282 ExecRowMark *erm = aerm->rowmark; in ExecLockRows() local
287 if (!erm->ermActive) in ExecLockRows()
289 Assert(erm->rti != erm->prti); /* check it's child table */ in ExecLockRows()
290 EvalPlanQualSetTuple(&node->lr_epqstate, erm->rti, NULL); in ExecLockRows()
295 if (node->lr_curtuples[erm->rti - 1] != NULL) in ExecLockRows()
299 erm->rti, in ExecLockRows()
300 node->lr_curtuples[erm->rti - 1]); in ExecLockRows()
302 node->lr_curtuples[erm->rti - 1] = NULL; in ExecLockRows()
307 Assert(erm->relation->rd_rel->relkind != RELKIND_FOREIGN_TABLE); in ExecLockRows()
308 Assert(ItemPointerIsValid(&(erm->curCtid))); in ExecLockRows()
311 tuple.t_self = erm->curCtid; in ExecLockRows()
312 if (!heap_fetch(erm->relation, SnapshotAny, &tuple, &buffer, in ExecLockRows()
317 EvalPlanQualSetTuple(&node->lr_epqstate, erm->rti, in ExecLockRows()
410 ExecRowMark *erm; in ExecInitLockRows() local
421 erm = ExecFindRowMark(estate, rc->rti, false); in ExecInitLockRows()
422 aerm = ExecBuildAuxRowMark(erm, outerPlan->targetlist); in ExecInitLockRows()
430 if (RowMarkRequiresRowShareLock(erm->markType)) in ExecInitLockRows()