Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
d0cd7bda
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,体验更适合开发者的 AI 搜索 >>
提交
d0cd7bda
编写于
2月 04, 2016
作者:
R
Robert Haas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
postgres_fdw: pgindent run.
In preparation for upcoming commits.
上级
37c84570
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
14 deletion
+15
-14
contrib/postgres_fdw/postgres_fdw.c
contrib/postgres_fdw/postgres_fdw.c
+15
-14
未找到文件。
contrib/postgres_fdw/postgres_fdw.c
浏览文件 @
d0cd7bda
...
...
@@ -394,7 +394,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
fpinfo
->
shippable_extensions
=
ExtractExtensionList
(
defGetString
(
def
),
false
);
else
if
(
strcmp
(
def
->
defname
,
"fetch_size"
)
==
0
)
fpinfo
->
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
fpinfo
->
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
}
foreach
(
lc
,
fpinfo
->
table
->
options
)
{
...
...
@@ -403,7 +403,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
if
(
strcmp
(
def
->
defname
,
"use_remote_estimate"
)
==
0
)
fpinfo
->
use_remote_estimate
=
defGetBoolean
(
def
);
else
if
(
strcmp
(
def
->
defname
,
"fetch_size"
)
==
0
)
fpinfo
->
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
fpinfo
->
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
}
/*
...
...
@@ -530,8 +530,8 @@ get_useful_ecs_for_relation(PlannerInfo *root, RelOptInfo *rel)
Relids
relids
;
/*
* First, consider whether any active EC is potentially useful for a
*
merge
join against this relation.
* First, consider whether any active EC is potentially useful for a
merge
* join against this relation.
*/
if
(
rel
->
has_eclass_joins
)
{
...
...
@@ -646,13 +646,13 @@ get_useful_pathkeys_for_relation(PlannerInfo *root, RelOptInfo *rel)
}
/*
* Even if we're not using remote estimates, having the remote side do
*
the sort generally won't be any worse than doing it locally, and i
t
*
might be much better if the remote side can generate data in the right
*
order without needing a sort at all. However, what we're going to do
*
next is try to generate pathkeys that seem promising for possible merge
*
joins, and that's more speculative. A wrong choice might hurt quite a
* b
it, so b
ail out if we can't use remote estimates.
* Even if we're not using remote estimates, having the remote side do
the
*
sort generally won't be any worse than doing it locally, and it migh
t
*
be much better if the remote side can generate data in the right order
*
without needing a sort at all. However, what we're going to do next is
*
try to generate pathkeys that seem promising for possible merge joins,
*
and that's more speculative. A wrong choice might hurt quite a bit, so
* bail out if we can't use remote estimates.
*/
if
(
!
fpinfo
->
use_remote_estimate
)
return
useful_pathkeys_list
;
...
...
@@ -1006,6 +1006,7 @@ postgresGetForeignPlan(PlannerInfo *root,
deparseSelectStmtForRel
(
&
sql
,
root
,
baserel
,
remote_conds
,
best_path
->
path
.
pathkeys
,
&
retrieved_attrs
,
&
params_list
);
/*
* Build the fdw_private list that will be available to the executor.
* Items in the list must match enum FdwScanPrivateIndex, above.
...
...
@@ -1090,7 +1091,7 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags)
fsstate
->
retrieved_attrs
=
(
List
*
)
list_nth
(
fsplan
->
fdw_private
,
FdwScanPrivateRetrievedAttrs
);
fsstate
->
fetch_size
=
intVal
(
list_nth
(
fsplan
->
fdw_private
,
FdwScanPrivateFetchSize
));
FdwScanPrivateFetchSize
));
/* Create contexts for batches of tuples and per-tuple temp workspace. */
fsstate
->
batch_cxt
=
AllocSetContextCreate
(
estate
->
es_query_cxt
,
...
...
@@ -2640,7 +2641,7 @@ postgresAcquireSampleRowsFunc(Relation relation, int elevel,
if
(
strcmp
(
def
->
defname
,
"fetch_size"
)
==
0
)
{
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
break
;
}
}
...
...
@@ -2650,7 +2651,7 @@ postgresAcquireSampleRowsFunc(Relation relation, int elevel,
if
(
strcmp
(
def
->
defname
,
"fetch_size"
)
==
0
)
{
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
fetch_size
=
strtol
(
defGetString
(
def
),
NULL
,
10
);
break
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录