Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
002796b5
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,发现更多精彩内容 >>
提交
002796b5
编写于
11月 28, 1997
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename heap_destroyr to heap_destroy, heap_destroy to heap_destroy_with_catalog.
上级
c445ba33
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
47 addition
and
47 deletion
+47
-47
src/backend/bootstrap/bootparse.y
src/backend/bootstrap/bootparse.y
+3
-3
src/backend/catalog/heap.c
src/backend/catalog/heap.c
+15
-15
src/backend/commands/cluster.c
src/backend/commands/cluster.c
+4
-4
src/backend/commands/creatinh.c
src/backend/commands/creatinh.c
+3
-3
src/backend/commands/recipe.c
src/backend/commands/recipe.c
+3
-3
src/backend/commands/remove.c
src/backend/commands/remove.c
+2
-2
src/backend/commands/view.c
src/backend/commands/view.c
+2
-2
src/backend/executor/execMain.c
src/backend/executor/execMain.c
+2
-2
src/backend/executor/nodeMaterial.c
src/backend/executor/nodeMaterial.c
+2
-2
src/backend/executor/nodeTee.c
src/backend/executor/nodeTee.c
+4
-4
src/backend/storage/large_object/inv_api.c
src/backend/storage/large_object/inv_api.c
+3
-3
src/include/catalog/heap.h
src/include/catalog/heap.h
+4
-4
未找到文件。
src/backend/bootstrap/bootparse.y
浏览文件 @
002796b5
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.
8 1997/11/28 04:39:25
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/bootstrap/bootparse.y,v 1.
9 1997/11/28 17:26:43
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -178,10 +178,10 @@ CreateStmt:
{
Oid id;
TupleDesc tupdesc;
/* extern Oid heap_create_
and
_catalog();*/
/* extern Oid heap_create_
with
_catalog();*/
tupdesc = CreateTupleDesc(numattr,attrtypes);
id = heap_create_
and
_catalog(LexIDStr($3), tupdesc);
id = heap_create_
with
_catalog(LexIDStr($3), tupdesc);
if (!Quiet)
printf("CREATED relation %s with OID %d\n",
LexIDStr($3), id);
...
...
src/backend/catalog/heap.c
浏览文件 @
002796b5
...
...
@@ -7,16 +7,16 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.3
8 1997/11/28 04:39:34
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.3
9 1997/11/28 17:26:51
momjian Exp $
*
* INTERFACE ROUTINES
* heap_create() - Create an uncataloged heap relation
* heap_create_
and
_catalog() - Create a cataloged relation
* heap_destroy() - Removes named relation from catalogs
* heap_create_
with
_catalog() - Create a cataloged relation
* heap_destroy
_with_catalog
() - Removes named relation from catalogs
*
* NOTES
* this code taken from access/heap/create.c, which contains
* the old heap_create_
and
_catalogr, amcreate, and amdestroy.
* the old heap_create_
with
_catalogr, amcreate, and amdestroy.
* those routines will soon call these routines using the function
* manager,
* just like the poorly named "NewXXX" routines do. The
...
...
@@ -332,7 +332,7 @@ heap_create(char *name,
/* ----------------------------------------------------------------
* heap_create_
and
_catalog - Create a cataloged relation
* heap_create_
with
_catalog - Create a cataloged relation
*
* this is done in 6 steps:
*
...
...
@@ -343,7 +343,7 @@ heap_create(char *name,
* preforms a scan to ensure that no relation with the
* same name already exists.
*
* 3) heap_create_
and
_catalogr() is called to create the new relation
* 3) heap_create_
with
_catalogr() is called to create the new relation
* on disk.
*
* 4) TypeDefine() is called to define a new type corresponding
...
...
@@ -376,7 +376,7 @@ heap_create(char *name,
* create new relation
* insert new relation into attribute catalog
*
* Should coordinate with heap_create_
and
_catalogr(). Either
* Should coordinate with heap_create_
with
_catalogr(). Either
* it should not be called or there should be a way to prevent
* the relation from being removed at the end of the
* transaction if it is successful ('u'/'r' may be enough).
...
...
@@ -739,13 +739,13 @@ addNewRelationType(char *typeName, Oid new_rel_oid)
}
/* --------------------------------
* heap_create_
and
_catalog
* heap_create_
with
_catalog
*
* creates a new cataloged relation. see comments above.
* --------------------------------
*/
Oid
heap_create_
and
_catalog
(
char
relname
[],
heap_create_
with
_catalog
(
char
relname
[],
TupleDesc
tupdesc
)
{
Relation
pg_class_desc
;
...
...
@@ -830,7 +830,7 @@ heap_create_and_catalog(char relname[],
/* ----------------------------------------------------------------
* heap_destroy - removes all record of named relation from catalogs
* heap_destroy
_with_catalog
- removes all record of named relation from catalogs
*
* 1) open relation, check for existence, etc.
* 2) remove inheritance information
...
...
@@ -1246,12 +1246,12 @@ DeletePgTypeTuple(Relation rdesc)
}
/* --------------------------------
* heap_destroy
* heap_destroy
_with_catalog
*
* --------------------------------
*/
void
heap_destroy
(
char
*
relname
)
heap_destroy
_with_catalog
(
char
*
relname
)
{
Relation
rdesc
;
Oid
rid
;
...
...
@@ -1358,13 +1358,13 @@ heap_destroy(char *relname)
}
/*
* heap_destroy
r
* heap_destroy
* destroy and close temporary relations
*
*/
void
heap_destroy
r
(
Relation
rdesc
)
heap_destroy
(
Relation
rdesc
)
{
ReleaseRelationBuffers
(
rdesc
);
if
(
!
(
rdesc
->
rd_istemp
)
||
!
(
rdesc
->
rd_tmpunlinked
))
...
...
@@ -1475,7 +1475,7 @@ DestroyTempRels(void)
rdesc
=
tempRels
->
rels
[
i
];
/* rdesc may be NULL if it has been removed from the list already */
if
(
rdesc
)
heap_destroy
r
(
rdesc
);
heap_destroy
(
rdesc
);
}
free
(
tempRels
->
rels
);
free
(
tempRels
);
...
...
src/backend/commands/cluster.c
浏览文件 @
002796b5
...
...
@@ -14,7 +14,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.1
8 1997/11/28 04:39:43
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.1
9 1997/11/28 17:26:55
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -175,7 +175,7 @@ cluster(char oldrelname[], char oldindexname[])
/* Destroy old heap (along with its index) and rename new. */
heap_destroy
(
oldrelname
);
heap_destroy
_with_catalog
(
oldrelname
);
renamerel
(
NewHeapName
,
saveoldrelname
);
TypeRename
(
NewHeapName
,
saveoldrelname
);
...
...
@@ -209,13 +209,13 @@ copy_heap(Oid OIDOldHeap)
OldHeapDesc
=
RelationGetTupleDescriptor
(
OldHeap
);
/*
* Need to make a copy of the tuple descriptor, heap_create_
and
_catalog
* Need to make a copy of the tuple descriptor, heap_create_
with
_catalog
* modifies it.
*/
tupdesc
=
CreateTupleDescCopy
(
OldHeapDesc
);
OIDNewHeap
=
heap_create_
and
_catalog
(
NewName
,
tupdesc
);
OIDNewHeap
=
heap_create_
with
_catalog
(
NewName
,
tupdesc
);
if
(
!
OidIsValid
(
OIDNewHeap
))
elog
(
WARN
,
"clusterheap: cannot create temporary heap relation
\n
"
);
...
...
src/backend/commands/creatinh.c
浏览文件 @
002796b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.2
0 1997/11/28 04:39:48
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.2
1 1997/11/28 17:27:04
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -137,7 +137,7 @@ DefineRelation(CreateStmt *stmt)
}
}
relationId
=
heap_create_
and
_catalog
(
relname
,
descriptor
);
relationId
=
heap_create_
with
_catalog
(
relname
,
descriptor
);
StoreCatalogInheritance
(
relationId
,
inheritList
);
}
...
...
@@ -157,7 +157,7 @@ void
RemoveRelation
(
char
*
name
)
{
AssertArg
(
name
);
heap_destroy
(
name
);
heap_destroy
_with_catalog
(
name
);
}
...
...
src/backend/commands/recipe.c
浏览文件 @
002796b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.1
4 1997/11/28 04:39:53
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.1
5 1997/11/28 17:27:08
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -1047,7 +1047,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
len
=
length
(
q
->
qtrees
[
0
]
->
targetList
);
tupdesc
=
rel
->
rd_att
;
relid
=
heap_create_
and
_catalog
(
relid
=
heap_create_
with
_catalog
(
child
->
nodeElem
->
outTypes
->
val
[
0
],
tupdesc
);
}
else
...
...
@@ -1072,7 +1072,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
}
else
{
relid
=
heap_create_
and
_catalog
(
relid
=
heap_create_
with
_catalog
(
child
->
nodeElem
->
outTypes
->
val
[
0
],
tupdesc
);
}
}
...
...
src/backend/commands/remove.c
浏览文件 @
002796b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.1
7 1997/11/25 21:59:03
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.1
8 1997/11/28 17:27:10
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -241,7 +241,7 @@ AttributeAndRelationRemove(Oid typeOid)
char
*
name
;
name
=
(((
Form_pg_class
)
GETSTRUCT
(
tup
))
->
relname
).
data
;
heap_destroy
(
name
);
heap_destroy
_with_catalog
(
name
);
}
}
heap_endscan
(
sdesc
);
...
...
src/backend/commands/view.c
浏览文件 @
002796b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.1
6 1997/11/25 21:59:12
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.1
7 1997/11/28 17:27:13
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -314,6 +314,6 @@ RemoveView(char *viewName)
/*
* now remove the relation.
*/
heap_destroy
(
viewName
);
heap_destroy
_with_catalog
(
viewName
);
pfree
(
rname
);
}
src/backend/executor/execMain.c
浏览文件 @
002796b5
...
...
@@ -26,7 +26,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.3
4 1997/11/28 04:40:08
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.3
5 1997/11/28 17:27:20
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -572,7 +572,7 @@ InitPlan(CmdType operation, Query *parseTree, Plan *plan, EState *estate)
/* fixup to prevent zero-length columns in create */
setVarAttrLenForCreateTable
(
tupdesc
,
targetList
,
rangeTable
);
intoRelationId
=
heap_create_
and
_catalog
(
intoName
,
tupdesc
);
intoRelationId
=
heap_create_
with
_catalog
(
intoName
,
tupdesc
);
#ifdef NOT_USED
/* it's copy ... */
resetVarAttrLenForCreateTable
(
tupdesc
);
#endif
...
...
src/backend/executor/nodeMaterial.c
浏览文件 @
002796b5
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.1
0 1997/11/20 23:21:32
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.1
1 1997/11/28 17:27:25
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -319,7 +319,7 @@ ExecEndMaterial(Material *node)
matstate
=
node
->
matstate
;
tempRelation
=
matstate
->
mat_TempRelation
;
heap_destroy
r
(
tempRelation
);
heap_destroy
(
tempRelation
);
/* ----------------
* close the temp relation and shut down the scan.
...
...
src/backend/executor/nodeTee.c
浏览文件 @
002796b5
...
...
@@ -15,7 +15,7 @@
* ExecEndTee
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.1
2 1997/11/28 04:40:12
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.1
3 1997/11/28 17:27:31
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -168,7 +168,7 @@ ExecInitTee(Tee *node, EState *currentEstate, Plan *parent)
bufferRel
=
heap_openr
(
teeState
->
tee_bufferRelname
);
else
bufferRel
=
heap_open
(
heap_create_
and
_catalog
(
teeState
->
tee_bufferRelname
,
tupType
));
heap_create_
with
_catalog
(
teeState
->
tee_bufferRelname
,
tupType
));
}
else
{
...
...
@@ -177,7 +177,7 @@ ExecInitTee(Tee *node, EState *currentEstate, Plan *parent)
newoid
());
/* bufferRel = ExecCreatR(len, tupType, _TEMP_RELATION_ID); */
bufferRel
=
heap_open
(
heap_create_
and
_catalog
(
teeState
->
tee_bufferRelname
,
tupType
));
heap_create_
with
_catalog
(
teeState
->
tee_bufferRelname
,
tupType
));
}
teeState
->
tee_bufferRel
=
bufferRel
;
...
...
@@ -519,7 +519,7 @@ ExecEndTee(Tee *node, Plan *parent)
bufferRel
=
teeState
->
tee_bufferRel
;
if
(
bufferRel
)
{
heap_destroy
r
(
bufferRel
);
heap_destroy
(
bufferRel
);
teeState
->
tee_bufferRel
=
NULL
;
if
(
teeState
->
tee_mcxt
)
{
...
...
src/backend/storage/large_object/inv_api.c
浏览文件 @
002796b5
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.2
3 1997/11/28 04:40:28
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.2
4 1997/11/28 17:27:50
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -139,7 +139,7 @@ inv_create(int flags)
* be located on whatever storage manager the user requested.
*/
heap_create_
and
_catalog
(
objname
,
tupdesc
);
heap_create_
with
_catalog
(
objname
,
tupdesc
);
/* make the relation visible in this transaction */
CommandCounterIncrement
();
...
...
@@ -283,7 +283,7 @@ inv_destroy(Oid lobjId)
if
(
!
RelationIsValid
(
r
)
||
r
->
rd_rel
->
relkind
==
RELKIND_INDEX
)
return
-
1
;
heap_destroy
(
r
->
rd_rel
->
relname
.
data
);
heap_destroy
_with_catalog
(
r
->
rd_rel
->
relname
.
data
);
return
1
;
}
...
...
src/include/catalog/heap.h
浏览文件 @
002796b5
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: heap.h,v 1.
9 1997/11/28 04:40:40
momjian Exp $
* $Id: heap.h,v 1.
10 1997/11/28 17:28:02
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -18,10 +18,10 @@
extern
Relation
heap_create
(
char
*
relname
,
TupleDesc
att
);
extern
Oid
heap_create_
and
_catalog
(
char
relname
[],
TupleDesc
tupdesc
);
heap_create_
with
_catalog
(
char
relname
[],
TupleDesc
tupdesc
);
extern
void
heap_destroy
(
char
relname
[]);
extern
void
heap_destroy
r
(
Relation
r
);
extern
void
heap_destroy
_with_catalog
(
char
relname
[]);
extern
void
heap_destroy
(
Relation
r
);
extern
void
InitTempRelList
(
void
);
extern
void
DestroyTempRels
(
void
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录