Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
9cbb5fcd
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,发现更多精彩内容 >>
提交
9cbb5fcd
编写于
10月 24, 2000
作者:
P
Philip Warner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Various fixes to TAR header format
Fix for endian bug in TAR output Nicer error messages in pg_dump
上级
db2faa94
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
37 addition
and
15 deletion
+37
-15
src/bin/pg_dump/pg_backup_archiver.h
src/bin/pg_dump/pg_backup_archiver.h
+1
-1
src/bin/pg_dump/pg_backup_tar.c
src/bin/pg_dump/pg_backup_tar.c
+18
-12
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+18
-2
未找到文件。
src/bin/pg_dump/pg_backup_archiver.h
浏览文件 @
9cbb5fcd
...
...
@@ -62,7 +62,7 @@ typedef z_stream *z_streamp;
#define K_VERS_MAJOR 1
#define K_VERS_MINOR 4
#define K_VERS_REV
19
#define K_VERS_REV
20
/* Data block types */
#define BLK_DATA 1
...
...
src/bin/pg_dump/pg_backup_tar.c
浏览文件 @
9cbb5fcd
...
...
@@ -673,8 +673,8 @@ static void _LoadBlobs(ArchiveHandle* AH, RestoreOptions *ropt)
static
int
_WriteByte
(
ArchiveHandle
*
AH
,
const
int
i
)
{
lclContext
*
ctx
=
(
lclContext
*
)
AH
->
formatData
;
int
res
;
int
b
=
i
;
int
res
;
char
b
=
i
;
/* Avoid endian problems */
res
=
tarWrite
(
&
b
,
1
,
ctx
->
FH
);
if
(
res
!=
EOF
)
{
...
...
@@ -1088,28 +1088,34 @@ static void _tarWriteHeader(TAR_MEMBER* th)
sprintf
(
&
h
[
100
],
"100600 "
);
/* User ID 8 */
sprintf
(
&
h
[
108
],
"
0 "
);
sprintf
(
&
h
[
108
],
"
0400
0 "
);
/* Group 8 */
sprintf
(
&
h
[
116
],
"
0 "
);
sprintf
(
&
h
[
116
],
"
0200
0 "
);
/* File size 12 */
sprintf
(
&
h
[
124
],
"%1
2o
"
,
th
->
fileLen
);
sprintf
(
&
h
[
124
],
"%1
0o
"
,
th
->
fileLen
);
/* Mod Time 12 */
sprintf
(
&
h
[
136
],
"%1
2o
"
,
(
int
)
time
(
NULL
));
sprintf
(
&
h
[
136
],
"%1
0o
"
,
(
int
)
time
(
NULL
));
/* Checksum 8 */
sprintf
(
&
h
[
148
],
"%
8o
"
,
lastSum
);
sprintf
(
&
h
[
148
],
"%
6o
"
,
lastSum
);
/* Link 1 */
sprintf
(
&
h
[
156
],
"%c"
,
LF_NORMAL
);
/* Type 1 */
/* sprintf(&h[156], "%c", LF_NORMAL); */
sprintf
(
&
h
[
156
],
"0"
);
/* Link name 100 (NULL) */
/* Magic 8 */
sprintf
(
&
h
[
257
],
"ustar "
);
/* GNU Version...
* sprintf(&h[257], "ustar");
* sprintf(&h[263], "00");
*/
/* User 32 */
sprintf
(
&
h
[
265
],
"%.31s"
,
""
);
/* How do I get username reliably? Do I need to? */
...
...
@@ -1117,15 +1123,15 @@ static void _tarWriteHeader(TAR_MEMBER* th)
sprintf
(
&
h
[
297
],
"%.31s"
,
""
);
/* How do I get group reliably? Do I need to? */
/* Maj Dev 8 */
/* sprintf(&h[329], "%
8o
", 0); */
/* sprintf(&h[329], "%
6o
", 0); */
/* Min Dev */
/* sprintf(&h[337], "%
8o
", 0); */
/* sprintf(&h[337], "%
6o
", 0); */
while
(
(
sum
=
_tarChecksum
(
h
))
!=
lastSum
)
{
sprintf
(
&
h
[
148
],
"%
8o
"
,
sum
);
sprintf
(
&
h
[
148
],
"%
6o
"
,
sum
);
lastSum
=
sum
;
}
...
...
src/bin/pg_dump/pg_dump.c
浏览文件 @
9cbb5fcd
...
...
@@ -22,7 +22,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.17
5 2000/10/24 01:38:32 tgl
Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.17
6 2000/10/24 13:24:30 pjw
Exp $
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
...
...
@@ -696,7 +696,7 @@ main(int argc, char **argv)
if
(
strcmp
(
progname
,
"pg_backup"
)
==
0
)
{
format
=
"c"
;
outputBlobs
=
1
;
outputBlobs
=
true
;
}
#ifdef HAVE_GETOPT_LONG
...
...
@@ -864,6 +864,14 @@ main(int argc, char **argv)
}
}
if
(
optind
<
(
argc
-
1
))
{
fprintf
(
stderr
,
"%s: extra parameters found on command line after '%s' (first is '%s').
\n
"
"Please respecify command.
\n
Use -? for help on invocation options.
\n
"
,
progname
,
argv
[
optind
],
argv
[
optind
+
1
]);
exit
(
1
);
}
if
(
dataOnly
&&
schemaOnly
)
{
fprintf
(
stderr
,
...
...
@@ -888,6 +896,14 @@ main(int argc, char **argv)
exit
(
1
);
}
if
(
outputBlobs
==
true
&&
(
format
[
0
]
==
'p'
||
format
[
0
]
==
'P'
)
)
{
fprintf
(
stderr
,
"%s: BLOB output is not supported for plain text dump files. Use a different output format.
\n
"
,
progname
);
exit
(
1
);
}
/* open the output file */
switch
(
format
[
0
])
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录