摘要: 接前面,看 SeqNext 函数:/* ---------------------------------------------------------------- * SeqNext * * This is a workhorse for ExecSeqScan * ---------------------------------------------------------------- */static TupleTableSlot *SeqNext(SeqScanState *node){ HeapTuple tuple; Heap... 阅读全文
posted @ 2013-05-31 17:30 健哥的数据花园 阅读(511) 评论(0) 推荐(0) 编辑
摘要: 接前面,这次重点分析 ExecScan:其for 循环内部: for (;;) { TupleTableSlot *slot; CHECK_FOR_INTERRUPTS(); slot = ExecScanFetch(node, accessMtd, recheckMtd); /* * if the slot returned by the accessMtd contains NULL, then it means * there is nothing more to scan so we j... 阅读全文
posted @ 2013-05-31 15:36 健哥的数据花园 阅读(481) 评论(0) 推荐(0) 编辑
摘要: 这里又遇到了函数指针:executor.h头文件中,定义了 ExecScanAccessMtd 指针,或者定义了一个ExecScanAccessMtd 函数原型的指针/* * prototypes from functions in execScan.c */typedef TupleTableSlot *(*ExecScanAccessMtd) (ScanState *node);之后,在NodeSeqScan.c处有一个实现:/* ---------------------------------------------------------------- * SeqNex... 阅读全文
posted @ 2013-05-31 14:18 健哥的数据花园 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 看:TupleTableSlot *ExecProcNode(PlanState *node){ TupleTableSlot *result; CHECK_FOR_INTERRUPTS(); if (node->chgParam != NULL) /* something changed */ ExecReScan(node); /* let ReScan handle this */ if (node->instrument) InstrStartNode(node->instrument); switch (node... 阅读全文
posted @ 2013-05-31 09:53 健哥的数据花园 阅读(684) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示