Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
c64cc322
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,发现更多精彩内容 >>
提交
c64cc322
编写于
12月 18, 1997
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix Query handling for inheritance, and cost computations.
上级
d451a3b3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
27 addition
and
14 deletion
+27
-14
src/backend/nodes/copyfuncs.c
src/backend/nodes/copyfuncs.c
+8
-3
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/createplan.c
+13
-8
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/planmain.c
+2
-2
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/prep/prepunion.c
+4
-1
未找到文件。
src/backend/nodes/copyfuncs.c
浏览文件 @
c64cc322
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.1
6 1997/11/25 21:59:40
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.1
7 1997/12/18 03:03:31
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -516,7 +516,7 @@ _copyAgg(Agg *from)
CopyTempFields
((
Temp
*
)
from
,
(
Temp
*
)
newnode
);
newnode
->
numAgg
=
from
->
numAgg
;
newnode
->
aggs
=
m
alloc
(
sizeof
(
Aggreg
*
));
newnode
->
aggs
=
p
alloc
(
sizeof
(
Aggreg
*
));
for
(
i
=
0
;
i
<
from
->
numAgg
;
i
++
)
{
newnode
->
aggs
[
i
]
=
copyObject
(
from
->
aggs
[
i
]);
...
...
@@ -1519,7 +1519,7 @@ static Query *
_copyQuery
(
Query
*
from
)
{
Query
*
newnode
=
makeNode
(
Query
);
newnode
->
commandType
=
from
->
commandType
;
newnode
->
resultRelation
=
from
->
resultRelation
;
/* probably should dup this string instead of just pointing */
...
...
@@ -1555,6 +1555,11 @@ _copyQuery(Query *from)
Node_Copy
(
from
,
newnode
,
targetList
);
Node_Copy
(
from
,
newnode
,
qual
);
Node_Copy
(
from
,
newnode
,
groupClause
);
Node_Copy
(
from
,
newnode
,
havingQual
);
/* currently ignored */
Node_Copy
(
from
,
newnode
,
Aggreg
);
return
newnode
;
}
...
...
src/backend/optimizer/plan/createplan.c
浏览文件 @
c64cc322
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.1
6 1997/11/25 21:59:56
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.1
7 1997/12/18 03:03:35
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -943,7 +943,7 @@ make_seqscan(List *qptlist,
SeqScan
*
node
=
makeNode
(
SeqScan
);
Plan
*
plan
=
&
node
->
plan
;
plan
->
cost
=
0
.
0
;
plan
->
cost
=
(
lefttree
?
lefttree
->
cost
:
0
)
;
plan
->
state
=
(
EState
*
)
NULL
;
plan
->
targetlist
=
qptlist
;
plan
->
qual
=
qpqual
;
...
...
@@ -989,7 +989,8 @@ make_nestloop(List *qptlist,
NestLoop
*
node
=
makeNode
(
NestLoop
);
Plan
*
plan
=
&
node
->
join
;
plan
->
cost
=
0
.
0
;
plan
->
cost
=
(
lefttree
?
lefttree
->
cost
:
0
)
+
(
righttree
?
righttree
->
cost
:
0
);
plan
->
state
=
(
EState
*
)
NULL
;
plan
->
targetlist
=
qptlist
;
plan
->
qual
=
qpqual
;
...
...
@@ -1010,6 +1011,8 @@ make_hashjoin(List *tlist,
HashJoin
*
node
=
makeNode
(
HashJoin
);
Plan
*
plan
=
&
node
->
join
;
plan
->
cost
=
(
lefttree
?
lefttree
->
cost
:
0
)
+
(
righttree
?
righttree
->
cost
:
0
);
plan
->
cost
=
0
.
0
;
plan
->
state
=
(
EState
*
)
NULL
;
plan
->
targetlist
=
tlist
;
...
...
@@ -1031,6 +1034,7 @@ make_hash(List *tlist, Var *hashkey, Plan *lefttree)
Hash
*
node
=
makeNode
(
Hash
);
Plan
*
plan
=
&
node
->
plan
;
plan
->
cost
=
(
lefttree
?
lefttree
->
cost
:
0
);
plan
->
cost
=
0
.
0
;
plan
->
state
=
(
EState
*
)
NULL
;
plan
->
targetlist
=
tlist
;
...
...
@@ -1058,7 +1062,8 @@ make_mergesort(List *tlist,
MergeJoin
*
node
=
makeNode
(
MergeJoin
);
Plan
*
plan
=
&
node
->
join
;
plan
->
cost
=
0
.
0
;
plan
->
cost
=
(
lefttree
?
lefttree
->
cost
:
0
)
+
(
righttree
?
righttree
->
cost
:
0
);
plan
->
state
=
(
EState
*
)
NULL
;
plan
->
targetlist
=
tlist
;
plan
->
qual
=
qpqual
;
...
...
@@ -1078,7 +1083,7 @@ make_sort(List *tlist, Oid tempid, Plan *lefttree, int keycount)
Sort
*
node
=
makeNode
(
Sort
);
Plan
*
plan
=
&
node
->
plan
;
plan
->
cost
=
0
.
0
;
plan
->
cost
=
(
lefttree
?
lefttree
->
cost
:
0
)
;
plan
->
state
=
(
EState
*
)
NULL
;
plan
->
targetlist
=
tlist
;
plan
->
qual
=
NIL
;
...
...
@@ -1099,7 +1104,7 @@ make_material(List *tlist,
Material
*
node
=
makeNode
(
Material
);
Plan
*
plan
=
&
node
->
plan
;
plan
->
cost
=
0
.
0
;
plan
->
cost
=
(
lefttree
?
lefttree
->
cost
:
0
)
;
plan
->
state
=
(
EState
*
)
NULL
;
plan
->
targetlist
=
tlist
;
plan
->
qual
=
NIL
;
...
...
@@ -1137,7 +1142,7 @@ make_group(List *tlist,
{
Group
*
node
=
makeNode
(
Group
);
node
->
plan
.
cost
=
0
.
0
;
node
->
plan
.
cost
=
(
lefttree
?
lefttree
->
plan
.
cost
:
0
)
;
node
->
plan
.
state
=
(
EState
*
)
NULL
;
node
->
plan
.
qual
=
NULL
;
node
->
plan
.
targetlist
=
tlist
;
...
...
@@ -1164,7 +1169,7 @@ make_unique(List *tlist, Plan *lefttree, char *uniqueAttr)
Unique
*
node
=
makeNode
(
Unique
);
Plan
*
plan
=
&
node
->
plan
;
plan
->
cost
=
0
.
0
;
plan
->
cost
=
(
lefttree
?
lefttree
->
cost
:
0
)
;
plan
->
state
=
(
EState
*
)
NULL
;
plan
->
targetlist
=
tlist
;
plan
->
qual
=
NIL
;
...
...
src/backend/optimizer/plan/planmain.c
浏览文件 @
c64cc322
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.
8 1997/09/25 12:21:15 vadim
Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.
9 1997/12/18 03:03:38 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -362,7 +362,7 @@ make_result(List *tlist,
Plan
*
plan
=
&
node
->
plan
;
tlist
=
generate_fjoin
(
tlist
);
plan
->
cost
=
0
.
0
;
plan
->
cost
=
(
subplan
?
subplan
->
cost
:
0
)
;
plan
->
state
=
(
EState
*
)
NULL
;
plan
->
targetlist
=
tlist
;
plan
->
lefttree
=
subplan
;
...
...
src/backend/optimizer/prep/prepunion.c
浏览文件 @
c64cc322
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.
9 1997/11/25 22:00:10
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.
10 1997/12/18 03:03:41
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -241,6 +241,9 @@ plan_union_query(List *relids,
/* new_root->uniqueFlag = false; */
new_root
->
uniqueFlag
=
NULL
;
new_root
->
sortClause
=
NULL
;
new_root
->
groupClause
=
NULL
;
new_root
->
qry_numAgg
=
0
;
new_root
->
qry_aggs
=
NULL
;
fix_parsetree_attnums
(
rt_index
,
rt_entry
->
relid
,
relid
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录