292{
297
298 /* check for unsupported flags */
300
301 /*
302 * create state structure
303 */
308
309 /*
310 * Miscellaneous initialization
311 *
312 * LockRows nodes never call ExecQual or ExecProject, therefore no
313 * ExprContext is needed.
314 */
315
316 /*
317 * Initialize result type.
318 */
320
321 /*
322 * then initialize outer plan
323 */
325
326 /* node returns unmodified slots from the outer plan */
330
331 /*
332 * LockRows nodes do no projections, so initialize projection info for
333 * this node appropriately
334 */
336
337 /*
338 * Locate the ExecRowMark(s) that this node is responsible for, and
339 * construct ExecAuxRowMarks for them. (InitPlan should already have
340 * built the global list of ExecRowMarks.)
341 */
345 {
349
350 /*
351 * Ignore "parent" rowmarks, because they are irrelevant at runtime.
352 * Also ignore the rowmarks belonging to child tables that have been
353 * pruned in ExecDoInitialPruning().
354 */
357 continue;
358
359 /* find ExecRowMark and build ExecAuxRowMark */
362
363 /*
364 * Only locking rowmarks go into our own list. Non-locking marks are
365 * passed off to the EvalPlanQual machinery. This is because we don't
366 * want to bother fetching non-locked rows unless we actually have to
367 * do an EPQ recheck.
368 */
371 else
372 epq_arowmarks =
lappend(epq_arowmarks, aerm);
373 }
374
375 /* Now we have the info needed to set up EPQ state */
378
379 return lrstate;
380}
bool bms_is_member(int x, const Bitmapset *a)
ExecRowMark * ExecFindRowMark(EState *estate, Index rti, bool missing_ok)
ExecAuxRowMark * ExecBuildAuxRowMark(ExecRowMark *erm, List *targetlist)
void EvalPlanQualInit(EPQState *epqstate, EState *parentestate, Plan *subplan, List *auxrowmarks, int epqParam, List *resultRelations)
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
void ExecInitResultTypeTL(PlanState *planstate)
const TupleTableSlotOps * ExecGetResultSlotOps(PlanState *planstate, bool *isfixed)
Assert(PointerIsAligned(start, uint64))
List * lappend(List *list, void *datum)
static TupleTableSlot * ExecLockRows(PlanState *pstate)
#define lfirst_node(type, lc)
#define RowMarkRequiresRowShareLock(marktype)
Bitmapset * es_unpruned_relids
const TupleTableSlotOps * resultops
ProjectionInfo * ps_ProjInfo
ExecProcNodeMtd ExecProcNode