Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
31a697bf
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,发现更多精彩内容 >>
提交
31a697bf
编写于
1月 09, 1998
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Yohoo UNIONS of VIEWS.
上级
8f125413
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
38 addition
and
17 deletion
+38
-17
src/backend/nodes/copyfuncs.c
src/backend/nodes/copyfuncs.c
+14
-12
src/backend/rewrite/rewriteHandler.c
src/backend/rewrite/rewriteHandler.c
+7
-3
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+17
-2
未找到文件。
src/backend/nodes/copyfuncs.c
浏览文件 @
31a697bf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.2
7 1998/01/04 04:31:02
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.2
8 1998/01/09 05:48:10
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1520,6 +1520,16 @@ _copyQuery(Query *from)
int
i
;
newnode
->
commandType
=
from
->
commandType
;
if
(
from
->
utilityStmt
&&
nodeTag
(
from
->
utilityStmt
)
==
T_NotifyStmt
)
{
NotifyStmt
*
from_notify
=
(
NotifyStmt
*
)
from
->
utilityStmt
;
NotifyStmt
*
n
=
makeNode
(
NotifyStmt
);
int
length
=
strlen
(
from_notify
->
relname
);
n
->
relname
=
palloc
(
length
+
1
);
strcpy
(
n
->
relname
,
from_notify
->
relname
);
newnode
->
utilityStmt
=
(
Node
*
)
n
;
}
newnode
->
resultRelation
=
from
->
resultRelation
;
/* probably should dup this string instead of just pointing */
/* to the old one --djm */
...
...
@@ -1532,17 +1542,8 @@ _copyQuery(Query *from)
newnode
->
into
=
(
char
*
)
0
;
}
newnode
->
isPortal
=
from
->
isPortal
;
Node_Copy
(
from
,
newnode
,
rtable
);
if
(
from
->
utilityStmt
&&
nodeTag
(
from
->
utilityStmt
)
==
T_NotifyStmt
)
{
NotifyStmt
*
from_notify
=
(
NotifyStmt
*
)
from
->
utilityStmt
;
NotifyStmt
*
n
=
makeNode
(
NotifyStmt
);
int
length
=
strlen
(
from_notify
->
relname
);
n
->
relname
=
palloc
(
length
+
1
);
strcpy
(
n
->
relname
,
from_notify
->
relname
);
newnode
->
utilityStmt
=
(
Node
*
)
n
;
}
newnode
->
isBinary
=
from
->
isBinary
;
newnode
->
unionall
=
from
->
unionall
;
if
(
from
->
uniqueFlag
)
{
newnode
->
uniqueFlag
=
(
char
*
)
palloc
(
strlen
(
from
->
uniqueFlag
)
+
1
);
...
...
@@ -1551,6 +1552,7 @@ _copyQuery(Query *from)
else
newnode
->
uniqueFlag
=
NULL
;
Node_Copy
(
from
,
newnode
,
sortClause
);
Node_Copy
(
from
,
newnode
,
rtable
);
Node_Copy
(
from
,
newnode
,
targetList
);
Node_Copy
(
from
,
newnode
,
qual
);
...
...
src/backend/rewrite/rewriteHandler.c
浏览文件 @
31a697bf
...
...
@@ -6,7 +6,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.
9 1998/01/07 21:04:3
7 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.
10 1998/01/09 05:48:1
7 momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -598,8 +598,12 @@ RewriteQuery(Query *parsetree, bool *instead_flag, List **qual_products)
*/
Query
*
other
;
other
=
copyObject
(
parsetree
);
/* ApplyRetrieveRule changes the
* range table */
/*
* ApplyRetrieveRule changes the range table
* XXX Unions are copied again.
*/
other
=
copyObject
(
parsetree
);
return
ProcessRetrieveQuery
(
other
,
parsetree
->
rtable
,
instead_flag
,
FALSE
);
...
...
src/backend/tcop/postgres.c
浏览文件 @
31a697bf
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.
59 1998/01/07 21:06:00
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.
60 1998/01/09 05:48:22
momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -439,6 +439,8 @@ pg_parse_and_plan(char *query_string, /* string to execute */
* rewrites */
for
(
i
=
0
;
i
<
querytree_list
->
len
;
i
++
)
{
List
*
union_result
,
*
union_list
,
*
rewritten_list
;
querytree
=
querytree_list
->
qtrees
[
i
];
...
...
@@ -465,6 +467,19 @@ pg_parse_and_plan(char *query_string, /* string to execute */
/* rewrite queries (retrieve, append, delete, replace) */
rewritten
=
QueryRewrite
(
querytree
);
/*
* Rewrite the UNIONS.
*/
foreach
(
rewritten_list
,
rewritten
)
{
Query
*
qry
=
(
Query
*
)
lfirst
(
rewritten_list
);
union_result
=
NIL
;
foreach
(
union_list
,
qry
->
unionClause
)
union_result
=
nconc
(
union_result
,
QueryRewrite
((
Query
*
)
lfirst
(
union_list
)));
qry
->
unionClause
=
union_result
;
}
if
(
rewritten
!=
NULL
)
{
int
len
,
...
...
@@ -1372,7 +1387,7 @@ PostgresMain(int argc, char *argv[])
if
(
IsUnderPostmaster
==
false
)
{
puts
(
"
\n
POSTGRES backend interactive interface"
);
puts
(
"$Revision: 1.
59 $ $Date: 1998/01/07 21:06:00
$"
);
puts
(
"$Revision: 1.
60 $ $Date: 1998/01/09 05:48:22
$"
);
}
/* ----------------
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录