PostgreSQL Source Code: src/include/executor/execScan.h File Reference (original) (raw)

Go to the source code of this file.

ExecScanExtended()

Definition at line 152 of file execScan.h.

158{

160

161

162

163

164

165

166

167 if (!qual && !projInfo)

168 {

170 return ExecScanFetch(node, epqstate, accessMtd, recheckMtd);

171 }

172

173

174

175

176

178

179

180

181

182

183 for (;;)

184 {

186

187 slot = ExecScanFetch(node, epqstate, accessMtd, recheckMtd);

188

189

190

191

192

193

194

196 {

197 if (projInfo)

199 else

200 return slot;

201 }

202

203

204

205

207

208

209

210

211

212

213

214

215 if (qual == NULL || ExecQual(qual, econtext))

216 {

217

218

219

220 if (projInfo)

221 {

222

223

224

225

227 }

228 else

229 {

230

231

232

233 return slot;

234 }

235 }

236 else

238

239

240

241

243 }

244}

static pg_attribute_always_inline TupleTableSlot * ExecScanFetch(ScanState *node, EPQState *epqstate, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd)

#define InstrCountFiltered1(node, delta)

static TupleTableSlot * ExecProject(ProjectionInfo *projInfo)

#define ResetExprContext(econtext)

static bool ExecQual(ExprState *state, ExprContext *econtext)

TupleTableSlot * ecxt_scantuple

TupleTableSlot * resultslot

ExprContext * ps_ExprContext

static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)

References ExprContext::ecxt_scantuple, ExecClearTuple(), ExecProject(), ExecQual(), ExecScanFetch(), InstrCountFiltered1, ProjectionInfo::pi_state, ScanState::ps, PlanState::ps_ExprContext, ResetExprContext, ExprState::resultslot, and TupIsNull.

Referenced by ExecScan(), ExecSeqScan(), ExecSeqScanWithProject(), ExecSeqScanWithQual(), and ExecSeqScanWithQualProject().

ExecScanFetch()

Definition at line 32 of file execScan.h.

36{

38

39 if (epqstate != NULL)

40 {

41

42

43

44

45

47

48 if (scanrelid == 0)

49 {

50

51

52

53

54

55

56

58

59 if (!(*recheckMtd) (node, slot))

60 ExecClearTuple(slot);

61 return slot;

62 }

63 else if (epqstate->relsubs_done[scanrelid - 1])

64 {

65

66

67

68

69

71

73 }

74 else if (epqstate->relsubs_slot[scanrelid - 1] != NULL)

75 {

76

77

78

79

81

83

84

86

87

89 return NULL;

90

91

92 if (!(*recheckMtd) (node, slot))

93 return ExecClearTuple(slot);

94

95 return slot;

96 }

97 else if (epqstate->relsubs_rowmark[scanrelid - 1] != NULL)

98 {

99

100

101

102

104

105

106 epqstate->relsubs_done[scanrelid - 1] = true;

107

109 return NULL;

110

111

113 return NULL;

114

115

116 if (!(*recheckMtd) (node, slot))

117 return ExecClearTuple(slot);

118

119 return slot;

120 }

121 }

122

123

124

125

126 return (*accessMtd) (node);

127}

bool EvalPlanQualFetchRowMark(EPQState *epqstate, Index rti, TupleTableSlot *slot)

Assert(PointerIsAligned(start, uint64))

#define CHECK_FOR_INTERRUPTS()

ExecAuxRowMark ** relsubs_rowmark

TupleTableSlot ** relsubs_slot

TupleTableSlot * ss_ScanTupleSlot

References Assert(), CHECK_FOR_INTERRUPTS, EvalPlanQualFetchRowMark(), ExecClearTuple(), PlanState::plan, ScanState::ps, EPQState::relsubs_done, EPQState::relsubs_rowmark, EPQState::relsubs_slot, ScanState::ss_ScanTupleSlot, and TupIsNull.

Referenced by ExecScanExtended().