Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
e9ad14f9
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,发现更多精彩内容 >>
提交
e9ad14f9
编写于
5月 14, 2010
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use NAMEDATALEN instead of local define.
Modify path separators for Win32. Per ideas from Takahiro Itagaki
上级
36d3afd2
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
24 deletion
+18
-24
contrib/pg_upgrade/exec.c
contrib/pg_upgrade/exec.c
+3
-3
contrib/pg_upgrade/file.c
contrib/pg_upgrade/file.c
+0
-6
contrib/pg_upgrade/option.c
contrib/pg_upgrade/option.c
+6
-2
contrib/pg_upgrade/pg_upgrade.h
contrib/pg_upgrade/pg_upgrade.h
+7
-11
contrib/pg_upgrade/version_old_8_3.c
contrib/pg_upgrade/version_old_8_3.c
+2
-2
未找到文件。
contrib/pg_upgrade/exec.c
浏览文件 @
e9ad14f9
...
...
@@ -138,7 +138,7 @@ check_exec(migratorContext *ctx, const char *dir, const char *cmdName)
char
path
[
MAXPGPATH
];
const
char
*
errMsg
;
snprintf
(
path
,
sizeof
(
path
),
"%s
%c%s"
,
dir
,
pathSeparato
r
,
cmdName
);
snprintf
(
path
,
sizeof
(
path
),
"%s
/%s"
,
di
r
,
cmdName
);
if
((
errMsg
=
validate_exec
(
path
))
==
NULL
)
return
1
;
/* 1 -> first alternative OK */
...
...
@@ -286,8 +286,8 @@ check_data_dir(migratorContext *ctx, const char *pg_data)
{
struct
stat
statBuf
;
snprintf
(
subDirName
,
sizeof
(
subDirName
),
"%s
%c
%s"
,
pg_data
,
pathSeparator
,
requiredSubdirs
[
subdirnum
]);
snprintf
(
subDirName
,
sizeof
(
subDirName
),
"%s
/
%s"
,
pg_data
,
requiredSubdirs
[
subdirnum
]);
if
((
stat
(
subDirName
,
&
statBuf
))
!=
0
)
{
...
...
contrib/pg_upgrade/file.c
浏览文件 @
e9ad14f9
...
...
@@ -13,12 +13,6 @@
#include <windows.h>
#endif
#ifndef WIN32
char
pathSeparator
=
'/'
;
#else
char
pathSeparator
=
'\\'
;
#endif
static
int
copy_file
(
const
char
*
fromfile
,
const
char
*
tofile
,
bool
force
);
...
...
contrib/pg_upgrade/option.c
浏览文件 @
e9ad14f9
...
...
@@ -308,9 +308,13 @@ validateDirectoryOption(migratorContext *ctx, char **dirpath,
/*
* Trim off any trailing path separators
*/
if
((
*
dirpath
)[
strlen
(
*
dirpath
)
-
1
]
==
pathSeparator
)
#ifndef WIN32
if
((
*
dirpath
)[
strlen
(
*
dirpath
)
-
1
]
==
'/'
)
#else
if
((
*
dirpath
)[
strlen
(
*
dirpath
)
-
1
]
==
'/'
||
(
*
dirpath
)[
strlen
(
*
dirpath
)
-
1
]
==
'\\'
)
#endif
(
*
dirpath
)[
strlen
(
*
dirpath
)
-
1
]
=
0
;
}
...
...
contrib/pg_upgrade/pg_upgrade.h
浏览文件 @
e9ad14f9
...
...
@@ -16,8 +16,6 @@
#include "libpq-fe.h"
/* Allocate for null byte */
#define NAMEDATASIZE (NAMEDATALEN + 1)
#define USER_NAME_SIZE 128
#define MAX_STRING 1024
...
...
@@ -73,15 +71,13 @@ extern int pgunlink(const char *path);
extern
void
copydir
(
char
*
fromdir
,
char
*
todir
,
bool
recurse
);
extern
bool
rmtree
(
const
char
*
path
,
bool
rmtopdir
);
extern
char
pathSeparator
;
/*
* Each relation is represented by a relinfo structure.
*/
typedef
struct
{
char
nspname
[
NAMEDATA
SIZE
];
/* namespace name */
char
relname
[
NAMEDATA
SIZE
];
/* relation name */
char
nspname
[
NAMEDATA
LEN
];
/* namespace name */
char
relname
[
NAMEDATA
LEN
];
/* relation name */
Oid
reloid
;
/* relation oid */
Oid
relfilenode
;
/* relation relfile node */
Oid
toastrelid
;
/* oid of the toast relation */
...
...
@@ -103,10 +99,10 @@ typedef struct
Oid
new
;
/* Relfilenode of the new relation */
char
old_file
[
MAXPGPATH
];
char
new_file
[
MAXPGPATH
];
char
old_nspname
[
NAMEDATA
SIZE
];
/* old name of the namespace */
char
old_relname
[
NAMEDATA
SIZE
];
/* old name of the relation */
char
new_nspname
[
NAMEDATA
SIZE
];
/* new name of the namespace */
char
new_relname
[
NAMEDATA
SIZE
];
/* new name of the relation */
char
old_nspname
[
NAMEDATA
LEN
];
/* old name of the namespace */
char
old_relname
[
NAMEDATA
LEN
];
/* old name of the relation */
char
new_nspname
[
NAMEDATA
LEN
];
/* new name of the namespace */
char
new_relname
[
NAMEDATA
LEN
];
/* new name of the relation */
}
FileNameMap
;
/*
...
...
@@ -115,7 +111,7 @@ typedef struct
typedef
struct
{
Oid
db_oid
;
/* oid of the database */
char
db_name
[
NAMEDATA
SIZE
];
/* database name */
char
db_name
[
NAMEDATA
LEN
];
/* database name */
char
db_tblspace
[
MAXPGPATH
];
/* database default tablespace path */
RelInfoArr
rel_arr
;
/* array of all user relinfos */
}
DbInfo
;
...
...
contrib/pg_upgrade/version_old_8_3.c
浏览文件 @
e9ad14f9
...
...
@@ -318,8 +318,8 @@ old_8_3_rebuild_tsvector_tables(migratorContext *ctx, bool check_mode,
{
PGresult
*
res
;
bool
db_used
=
false
;
char
old_nspname
[
NAMEDATA
SIZE
]
=
""
,
old_relname
[
NAMEDATA
SIZE
]
=
""
;
char
old_nspname
[
NAMEDATA
LEN
]
=
""
,
old_relname
[
NAMEDATA
LEN
]
=
""
;
int
ntups
;
int
rowno
;
int
i_nspname
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录