PostgreSQL Source Code: src/backend/executor/nodeForeignscan.c Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

24

29

32

33

34

35

36

37

38

39

42{

47

48

51 {

52

53

54

55

57

59 }

60 else

63

64

65

66

67

70

71 return slot;

72}

73

74

75

76

77static bool

79{

82

83

84

85

87

88

90

92

93

94

95

96

97

98

99

100

103 return false;

104

106}

107

108

109

110

111

112

113

114

115

116

119{

123

124

125

126

127

128 if (estate->es_epq_active != NULL && plan->operation != CMD_SELECT)

129 return NULL;

130

134}

135

136

137

138

139

140

143{

145 Relation currentRelation = NULL;

147 int tlistvarno;

149

150

152

153

154

155

160

161

162

163

164

165

167

168

169

170

171

172 if (scanrelid > 0)

173 {

177 }

178 else

179 {

180

182 }

183

184

185

186

187

189 {

191

195

197 }

198 else

199 {

201

202

206

207 tlistvarno = scanrelid;

208 }

209

210

213

214

215

216

219

220

221

222

227

228

229

230

231

234

235

236

237

240

241

242

243

244

245

246

247

248

249

250

251

253 {

256 {

257 elog(ERROR, "result relation not initialized");

258 }

260 }

261

262

266

267

268

269

271 {

272

273

274

275

276

277

278

279

280

283 }

284 else

286

287 return scanstate;

288}

289

290

291

292

293

294

295

296void

298{

301

302

304 {

305 if (estate->es_epq_active == NULL)

307 }

308 else

310

311

314}

315

316

317

318

319

320

321

322void

324{

328

329

330

331

332

333 if (estate->es_epq_active != NULL && plan->operation != CMD_SELECT)

334 return;

335

337

338

339

340

341

342

345

347}

348

349

350

351

352

353

354

355void

357{

359

361 {

365 }

366}

367

368

369

370

371

372

373

374void

376{

378

380 {

382 void *coordinate;

383

387 }

388}

389

390

391

392

393

394

395

396void

398{

400

402 {

404 void *coordinate;

405

408 }

409}

410

411

412

413

414

415

416

417void

420{

422

424 {

426 void *coordinate;

427

430 }

431}

432

433

434

435

436

437

438

439

440void

442{

444

447}

448

449

450

451

452

453

454

455void

457{

460

461 Assert(fdwroutine->ForeignAsyncRequest != NULL);

462 fdwroutine->ForeignAsyncRequest(areq);

463}

464

465

466

467

468

469

470

471void

473{

476

477 Assert(fdwroutine->ForeignAsyncConfigureWait != NULL);

478 fdwroutine->ForeignAsyncConfigureWait(areq);

479}

480

481

482

483

484

485

486

487void

489{

492

493 Assert(fdwroutine->ForeignAsyncNotify != NULL);

494 fdwroutine->ForeignAsyncNotify(areq);

495}

void ExecReScan(PlanState *node)

ExprState * ExecInitQual(List *qual, PlanState *parent)

void ExecEndNode(PlanState *node)

PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)

void ExecAssignScanProjectionInfoWithVarno(ScanState *node, int varno)

TupleTableSlot * ExecScan(ScanState *node, ExecScanAccessMtd accessMtd, ExecScanRecheckMtd recheckMtd)

void ExecScanReScan(ScanState *node)

void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)

void ExecInitResultTypeTL(PlanState *planstate)

const TupleTableSlotOps TTSOpsHeapTuple

TupleDesc ExecTypeFromTL(List *targetList)

void ExecAssignExprContext(EState *estate, PlanState *planstate)

Relation ExecOpenScanRelation(EState *estate, Index scanrelid, int eflags)

#define outerPlanState(node)

#define EXEC_FLAG_BACKWARD

#define ResetExprContext(econtext)

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

bool(* ExecScanRecheckMtd)(ScanState *node, TupleTableSlot *slot)

TupleTableSlot *(* ExecScanAccessMtd)(ScanState *node)

FdwRoutine * GetFdwRoutineForRelation(Relation relation, bool makecopy)

FdwRoutine * GetFdwRoutineByServerId(Oid serverid)

Assert(PointerIsAligned(start, uint64))

if(TABLE==NULL||TABLE_index==NULL)

ForeignScanState * ExecInitForeignScan(ForeignScan *node, EState *estate, int eflags)

void ExecForeignScanInitializeDSM(ForeignScanState *node, ParallelContext *pcxt)

void ExecShutdownForeignScan(ForeignScanState *node)

void ExecAsyncForeignScanNotify(AsyncRequest *areq)

void ExecAsyncForeignScanConfigureWait(AsyncRequest *areq)

static TupleTableSlot * ExecForeignScan(PlanState *pstate)

void ExecAsyncForeignScanRequest(AsyncRequest *areq)

void ExecReScanForeignScan(ForeignScanState *node)

void ExecForeignScanReInitializeDSM(ForeignScanState *node, ParallelContext *pcxt)

void ExecEndForeignScan(ForeignScanState *node)

static bool ForeignRecheck(ForeignScanState *node, TupleTableSlot *slot)

static TupleTableSlot * ForeignNext(ForeignScanState *node)

void ExecForeignScanEstimate(ForeignScanState *node, ParallelContext *pcxt)

void ExecForeignScanInitializeWorker(ForeignScanState *node, ParallelWorkerContext *pwcxt)

#define castNode(_type_, nodeptr)

static MemoryContext MemoryContextSwitchTo(MemoryContext context)

#define RelationGetRelid(relation)

#define RelationGetDescr(relation)

void * shm_toc_allocate(shm_toc *toc, Size nbytes)

void shm_toc_insert(shm_toc *toc, uint64 key, void *address)

void * shm_toc_lookup(shm_toc *toc, uint64 key, bool noError)

#define shm_toc_estimate_chunk(e, sz)

#define shm_toc_estimate_keys(e, cnt)

struct PlanState * requestee

ResultRelInfo ** es_result_relations

struct EPQState * es_epq_active

TupleTableSlot * ecxt_scantuple

EstimateDSMForeignScan_function EstimateDSMForeignScan

ReScanForeignScan_function ReScanForeignScan

RecheckForeignScan_function RecheckForeignScan

InitializeDSMForeignScan_function InitializeDSMForeignScan

BeginDirectModify_function BeginDirectModify

BeginForeignScan_function BeginForeignScan

IterateDirectModify_function IterateDirectModify

EndForeignScan_function EndForeignScan

EndDirectModify_function EndDirectModify

ReInitializeDSMForeignScan_function ReInitializeDSMForeignScan

IterateForeignScan_function IterateForeignScan

InitializeWorkerForeignScan_function InitializeWorkerForeignScan

ShutdownForeignScan_function ShutdownForeignScan

struct FdwRoutine * fdwroutine

ExprState * fdw_recheck_quals

ResultRelInfo * resultRelInfo

shm_toc_estimator estimator

ExprContext * ps_ExprContext

ExecProcNodeMtd ExecProcNode

Relation ss_currentRelation

TupleDesc CreateTupleDescCopy(TupleDesc tupdesc)