Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
5f0a4684
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,发现更多精彩内容 >>
提交
5f0a4684
编写于
1月 11, 2005
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix tracking of dump-order dependencies for stand-alone composite types.
Per report from Robert Koepferl.
上级
5b354d2c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
30 addition
and
9 deletion
+30
-9
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+30
-9
未找到文件。
src/bin/pg_dump/pg_dump.c
浏览文件 @
5f0a4684
...
...
@@ -12,7 +12,7 @@
* by PostgreSQL
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.
399 2005/01/11 05:14:13
tgl Exp $
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.
400 2005/01/11 17:55:25
tgl Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -2349,8 +2349,13 @@ getTables(int *numTables)
* We include system catalogs, so that we can work if a user table is
* defined to inherit from a system catalog (pretty weird, but...)
*
* We ignore tables that are not type 'r' (ordinary relation) or 'S'
* (sequence) or 'v' (view).
* We ignore tables that are not type 'r' (ordinary relation), 'S'
* (sequence), 'v' (view), or 'c' (composite type).
*
* Composite-type table entries won't be dumped as such, but we have
* to make a DumpableObject for them so that we can track dependencies
* of the composite type (pg_depend entries for columns of the composite
* type link to the pg_class entry not the pg_type entry).
*
* Note: in this phase we should collect only a minimal amount of
* information about each table, basically just enough to decide if it
...
...
@@ -2380,10 +2385,11 @@ getTables(int *numTables)
"d.classid = c.tableoid and d.objid = c.oid and "
"d.objsubid = 0 and "
"d.refclassid = c.tableoid and d.deptype = 'i') "
"where relkind in ('%c', '%c', '%c') "
"where relkind in ('%c', '%c', '%c'
, '%c'
) "
"order by c.oid"
,
RELKIND_SEQUENCE
,
RELKIND_RELATION
,
RELKIND_SEQUENCE
,
RELKIND_VIEW
);
RELKIND_RELATION
,
RELKIND_SEQUENCE
,
RELKIND_VIEW
,
RELKIND_COMPOSITE_TYPE
);
}
else
if
(
g_fout
->
remoteVersion
>=
70300
)
{
...
...
@@ -2406,10 +2412,11 @@ getTables(int *numTables)
"d.classid = c.tableoid and d.objid = c.oid and "
"d.objsubid = 0 and "
"d.refclassid = c.tableoid and d.deptype = 'i') "
"where relkind in ('%c', '%c', '%c') "
"where relkind in ('%c', '%c', '%c'
, '%c'
) "
"order by c.oid"
,
RELKIND_SEQUENCE
,
RELKIND_RELATION
,
RELKIND_SEQUENCE
,
RELKIND_VIEW
);
RELKIND_RELATION
,
RELKIND_SEQUENCE
,
RELKIND_VIEW
,
RELKIND_COMPOSITE_TYPE
);
}
else
if
(
g_fout
->
remoteVersion
>=
70200
)
{
...
...
@@ -2545,7 +2552,9 @@ getTables(int *numTables)
* serial columns are never dumpable on their own; we will
* transpose their owning table's dump flag to them below.
*/
if
(
OidIsValid
(
tblinfo
[
i
].
owning_tab
))
if
(
tblinfo
[
i
].
relkind
==
RELKIND_COMPOSITE_TYPE
)
tblinfo
[
i
].
dump
=
false
;
else
if
(
OidIsValid
(
tblinfo
[
i
].
owning_tab
))
tblinfo
[
i
].
dump
=
false
;
else
selectDumpableTable
(
&
tblinfo
[
i
]);
...
...
@@ -7796,7 +7805,19 @@ getDependencies(void)
continue
;
}
addObjectDependency
(
dobj
,
refdobj
->
dumpId
);
/*
* Ordinarily, table rowtypes have implicit dependencies on their
* tables. However, for a composite type the implicit dependency
* goes the other way in pg_depend; which is the right thing for
* DROP but it doesn't produce the dependency ordering we need.
* So in that one case, we reverse the direction of the dependency.
*/
if
(
deptype
==
'i'
&&
dobj
->
objType
==
DO_TABLE
&&
refdobj
->
objType
==
DO_TYPE
)
addObjectDependency
(
refdobj
,
dobj
->
dumpId
);
else
/* normal case */
addObjectDependency
(
dobj
,
refdobj
->
dumpId
);
}
PQclear
(
res
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录