Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
338aa57b
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 搜索 >>
提交
338aa57b
编写于
8月 06, 2003
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename fields of DestReceiver to avoid collisions with (ill-considered)
macros in some platforms' sys/socket.h.
上级
d5f7d2c6
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
34 addition
and
34 deletion
+34
-34
src/backend/access/common/printtup.c
src/backend/access/common/printtup.c
+4
-4
src/backend/commands/portalcmds.c
src/backend/commands/portalcmds.c
+2
-2
src/backend/executor/execMain.c
src/backend/executor/execMain.c
+3
-3
src/backend/executor/execTuples.c
src/backend/executor/execTuples.c
+3
-3
src/backend/executor/tstoreReceiver.c
src/backend/executor/tstoreReceiver.c
+4
-4
src/backend/tcop/postgres.c
src/backend/tcop/postgres.c
+4
-4
src/backend/tcop/pquery.c
src/backend/tcop/pquery.c
+4
-4
src/include/tcop/dest.h
src/include/tcop/dest.h
+10
-10
未找到文件。
src/backend/access/common/printtup.c
浏览文件 @
338aa57b
...
...
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.7
7 2003/08/04 02:39:56 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/printtup.c,v 1.7
8 2003/08/06 17:46:45 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -90,9 +90,9 @@ printtup_create_DR(CommandDest dest, Portal portal)
else
self
->
pub
.
receiveTuple
=
printtup_20
;
}
self
->
pub
.
s
tartup
=
printtup_startup
;
self
->
pub
.
s
hutdown
=
printtup_shutdown
;
self
->
pub
.
d
estroy
=
printtup_destroy
;
self
->
pub
.
rS
tartup
=
printtup_startup
;
self
->
pub
.
rS
hutdown
=
printtup_shutdown
;
self
->
pub
.
rD
estroy
=
printtup_destroy
;
self
->
pub
.
mydest
=
dest
;
self
->
portal
=
portal
;
...
...
src/backend/commands/portalcmds.c
浏览文件 @
338aa57b
...
...
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/portalcmds.c,v 1.2
1 2003/08/04 02:39:58 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/portalcmds.c,v 1.2
2 2003/08/06 17:46:45 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -335,7 +335,7 @@ PersistHoldablePortal(Portal portal)
/* Fetch the result set into the tuplestore */
ExecutorRun
(
queryDesc
,
ForwardScanDirection
,
0L
);
(
*
queryDesc
->
dest
->
d
estroy
)
(
queryDesc
->
dest
);
(
*
queryDesc
->
dest
->
rD
estroy
)
(
queryDesc
->
dest
);
queryDesc
->
dest
=
NULL
;
/*
...
...
src/backend/executor/execMain.c
浏览文件 @
338aa57b
...
...
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.21
4 2003/08/04 02:39:58 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.21
5 2003/08/06 17:46:45 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -217,7 +217,7 @@ ExecutorRun(QueryDesc *queryDesc,
estate
->
es_processed
=
0
;
estate
->
es_lastoid
=
InvalidOid
;
(
*
dest
->
s
tartup
)
(
dest
,
operation
,
queryDesc
->
tupDesc
);
(
*
dest
->
rS
tartup
)
(
dest
,
operation
,
queryDesc
->
tupDesc
);
/*
* run plan
...
...
@@ -235,7 +235,7 @@ ExecutorRun(QueryDesc *queryDesc,
/*
* shutdown receiver
*/
(
*
dest
->
s
hutdown
)
(
dest
);
(
*
dest
->
rS
hutdown
)
(
dest
);
MemoryContextSwitchTo
(
oldcontext
);
...
...
src/backend/executor/execTuples.c
浏览文件 @
338aa57b
...
...
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.
69 2003/08/04 02:39:58 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.
70 2003/08/06 17:46:45 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -764,7 +764,7 @@ begin_tup_output_tupdesc(DestReceiver *dest, TupleDesc tupdesc)
tstate
->
metadata
=
TupleDescGetAttInMetadata
(
tupdesc
);
tstate
->
dest
=
dest
;
(
*
tstate
->
dest
->
s
tartup
)
(
tstate
->
dest
,
(
int
)
CMD_SELECT
,
tupdesc
);
(
*
tstate
->
dest
->
rS
tartup
)
(
tstate
->
dest
,
(
int
)
CMD_SELECT
,
tupdesc
);
return
tstate
;
}
...
...
@@ -817,7 +817,7 @@ do_text_output_multiline(TupOutputState *tstate, char *text)
void
end_tup_output
(
TupOutputState
*
tstate
)
{
(
*
tstate
->
dest
->
s
hutdown
)
(
tstate
->
dest
);
(
*
tstate
->
dest
->
rS
hutdown
)
(
tstate
->
dest
);
/* note that destroying the dest is not ours to do */
/* XXX worth cleaning up the attinmetadata? */
pfree
(
tstate
);
...
...
src/backend/executor/tstoreReceiver.c
浏览文件 @
338aa57b
...
...
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/tstoreReceiver.c,v 1.
8 2003/08/04 02:39:59 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/tstoreReceiver.c,v 1.
9 2003/08/06 17:46:45 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -78,9 +78,9 @@ CreateTuplestoreDestReceiver(Tuplestorestate *tStore,
TStoreState
*
self
=
(
TStoreState
*
)
palloc
(
sizeof
(
TStoreState
));
self
->
pub
.
receiveTuple
=
tstoreReceiveTuple
;
self
->
pub
.
s
tartup
=
tstoreStartupReceiver
;
self
->
pub
.
s
hutdown
=
tstoreShutdownReceiver
;
self
->
pub
.
d
estroy
=
tstoreDestroyReceiver
;
self
->
pub
.
rS
tartup
=
tstoreStartupReceiver
;
self
->
pub
.
rS
hutdown
=
tstoreShutdownReceiver
;
self
->
pub
.
rD
estroy
=
tstoreDestroyReceiver
;
self
->
pub
.
mydest
=
Tuplestore
;
self
->
tstore
=
tStore
;
...
...
src/backend/tcop/postgres.c
浏览文件 @
338aa57b
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.35
6 2003/08/04 04:03:06
tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.35
7 2003/08/06 17:46:45
tgl Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
...
...
@@ -878,7 +878,7 @@ exec_simple_query(const char *query_string)
receiver
,
completionTag
);
(
*
receiver
->
d
estroy
)
(
receiver
);
(
*
receiver
->
rD
estroy
)
(
receiver
);
PortalDrop
(
portal
,
false
);
...
...
@@ -1590,7 +1590,7 @@ exec_execute_message(const char *portal_name, long max_rows)
receiver
,
completionTag
);
(
*
receiver
->
d
estroy
)
(
receiver
);
(
*
receiver
->
rD
estroy
)
(
receiver
);
if
(
completed
)
{
...
...
@@ -2643,7 +2643,7 @@ PostgresMain(int argc, char *argv[], const char *username)
if
(
!
IsUnderPostmaster
)
{
puts
(
"
\n
POSTGRES backend interactive interface "
);
puts
(
"$Revision: 1.35
6 $ $Date: 2003/08/04 04:03:06
$
\n
"
);
puts
(
"$Revision: 1.35
7 $ $Date: 2003/08/06 17:46:45
$
\n
"
);
}
/*
...
...
src/backend/tcop/pquery.c
浏览文件 @
338aa57b
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.7
0 2003/08/04 02:40:04 momjian
Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.7
1 2003/08/06 17:46:46 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -457,7 +457,7 @@ PortalRun(Portal portal, long count,
treceiver
=
CreateDestReceiver
(
Tuplestore
,
portal
);
PortalRunUtility
(
portal
,
lfirst
(
portal
->
parseTrees
),
treceiver
,
NULL
);
(
*
treceiver
->
d
estroy
)
(
treceiver
);
(
*
treceiver
->
rD
estroy
)
(
treceiver
);
portal
->
portalUtilReady
=
true
;
}
...
...
@@ -666,7 +666,7 @@ RunFromStore(Portal portal, ScanDirection direction, long count,
{
long
current_tuple_count
=
0
;
(
*
dest
->
s
tartup
)
(
dest
,
CMD_SELECT
,
portal
->
tupDesc
);
(
*
dest
->
rS
tartup
)
(
dest
,
CMD_SELECT
,
portal
->
tupDesc
);
if
(
direction
==
NoMovementScanDirection
)
{
...
...
@@ -708,7 +708,7 @@ RunFromStore(Portal portal, ScanDirection direction, long count,
}
}
(
*
dest
->
s
hutdown
)
(
dest
);
(
*
dest
->
rS
hutdown
)
(
dest
);
return
(
uint32
)
current_tuple_count
;
}
...
...
src/include/tcop/dest.h
浏览文件 @
338aa57b
...
...
@@ -30,18 +30,18 @@
* CreateDestReceiver returns a receiver object appropriate to the specified
* destination. The executor, as well as utility statements that can return
* tuples, are passed the resulting DestReceiver* pointer. Each executor run
* or utility execution calls the receiver's
s
tartup method, then the
* receiveTuple method (zero or more times), then the
s
hutdown method.
* or utility execution calls the receiver's
rS
tartup method, then the
* receiveTuple method (zero or more times), then the
rS
hutdown method.
* The same receiver object may be re-used multiple times; eventually it is
* destroyed by calling its
d
estroy method.
* destroyed by calling its
rD
estroy method.
*
* The DestReceiver object returned by CreateDestReceiver may be a statically
* allocated object (for destination types that require no local state),
* in which case
d
estroy is a no-op. Alternatively it can be a palloc'd
* in which case
rD
estroy is a no-op. Alternatively it can be a palloc'd
* object that has DestReceiver as its first field and contains additional
* fields (see printtup.c for an example). These additional fields are then
* accessible to the DestReceiver functions by casting the DestReceiver*
* pointer passed to them. The palloc'd object is pfree'd by the
d
estroy
* pointer passed to them. The palloc'd object is pfree'd by the
rD
estroy
* method. Note that the caller of CreateDestReceiver should take care to
* do so in a memory context that is long-lived enough for the receiver
* object not to disappear while still needed.
...
...
@@ -54,7 +54,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: dest.h,v 1.4
0 2003/08/04 02:40:15 momjian
Exp $
* $Id: dest.h,v 1.4
1 2003/08/06 17:46:46 tgl
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -93,7 +93,7 @@ typedef enum
* pointers that the executor must call.
*
* Note: the receiveTuple routine must be passed a TupleDesc identical to the
* one given to the
s
tartup routine. The reason for passing it again is just
* one given to the
rS
tartup routine. The reason for passing it again is just
* that some destinations would otherwise need dynamic state merely to
* remember the tupledesc pointer.
* ----------------
...
...
@@ -107,12 +107,12 @@ struct _DestReceiver
TupleDesc
typeinfo
,
DestReceiver
*
self
);
/* Per-executor-run initialization and shutdown: */
void
(
*
s
tartup
)
(
DestReceiver
*
self
,
void
(
*
rS
tartup
)
(
DestReceiver
*
self
,
int
operation
,
TupleDesc
typeinfo
);
void
(
*
s
hutdown
)
(
DestReceiver
*
self
);
void
(
*
rS
hutdown
)
(
DestReceiver
*
self
);
/* Destroy the receiver object itself (if dynamically allocated) */
void
(
*
d
estroy
)
(
DestReceiver
*
self
);
void
(
*
rD
estroy
)
(
DestReceiver
*
self
);
/* CommandDest code for this receiver */
CommandDest
mydest
;
/* Private fields might appear beyond this point... */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录