Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
6cc88f0a
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6cc88f0a
编写于
7月 18, 2008
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Provide a function hook to let plug-ins get control around ExecutorRun.
ITAGAKI Takahiro
上级
8d7af890
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
2 deletion
+31
-2
src/backend/executor/execMain.c
src/backend/executor/execMain.c
+21
-1
src/include/executor/executor.h
src/include/executor/executor.h
+10
-1
未找到文件。
src/backend/executor/execMain.c
浏览文件 @
6cc88f0a
...
...
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.3
09 2008/05/12 20:02:00 alvherre
Exp $
* $PostgreSQL: pgsql/src/backend/executor/execMain.c,v 1.3
10 2008/07/18 18:23:46 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -58,6 +58,9 @@
#include "utils/tqual.h"
/* Hook for plugins to get control in ExecutorRun() */
ExecutorRun_hook_type
ExecutorRun_hook
=
NULL
;
typedef
struct
evalPlanQual
{
Index
rti
;
...
...
@@ -214,11 +217,28 @@ ExecutorStart(QueryDesc *queryDesc, int eflags)
* Note: count = 0 is interpreted as no portal limit, i.e., run to
* completion.
*
* We provide a function hook variable that lets loadable plugins
* get control when ExecutorRun is called. Such a plugin would
* normally call standard_ExecutorRun().
*
* ----------------------------------------------------------------
*/
TupleTableSlot
*
ExecutorRun
(
QueryDesc
*
queryDesc
,
ScanDirection
direction
,
long
count
)
{
TupleTableSlot
*
result
;
if
(
ExecutorRun_hook
)
result
=
(
*
ExecutorRun_hook
)
(
queryDesc
,
direction
,
count
);
else
result
=
standard_ExecutorRun
(
queryDesc
,
direction
,
count
);
return
result
;
}
TupleTableSlot
*
standard_ExecutorRun
(
QueryDesc
*
queryDesc
,
ScanDirection
direction
,
long
count
)
{
EState
*
estate
;
CmdType
operation
;
...
...
src/include/executor/executor.h
浏览文件 @
6cc88f0a
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.14
7 2008/03/28 00:21:56
tgl Exp $
* $PostgreSQL: pgsql/src/include/executor/executor.h,v 1.14
8 2008/07/18 18:23:47
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -60,6 +60,13 @@
((*(expr)->evalfunc) (expr, econtext, isNull, isDone))
/* Hook for plugins to get control in ExecutorRun() */
typedef
TupleTableSlot
*
(
*
ExecutorRun_hook_type
)
(
QueryDesc
*
queryDesc
,
ScanDirection
direction
,
long
count
);
extern
PGDLLIMPORT
ExecutorRun_hook_type
ExecutorRun_hook
;
/*
* prototypes from functions in execAmi.c
*/
...
...
@@ -136,6 +143,8 @@ extern HeapTuple ExecRemoveJunk(JunkFilter *junkfilter, TupleTableSlot *slot);
extern
void
ExecutorStart
(
QueryDesc
*
queryDesc
,
int
eflags
);
extern
TupleTableSlot
*
ExecutorRun
(
QueryDesc
*
queryDesc
,
ScanDirection
direction
,
long
count
);
extern
TupleTableSlot
*
standard_ExecutorRun
(
QueryDesc
*
queryDesc
,
ScanDirection
direction
,
long
count
);
extern
void
ExecutorEnd
(
QueryDesc
*
queryDesc
);
extern
void
ExecutorRewind
(
QueryDesc
*
queryDesc
);
extern
void
InitResultRelInfo
(
ResultRelInfo
*
resultRelInfo
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录