Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
74e33110
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,发现更多精彩内容 >>
提交
74e33110
编写于
8月 07, 2000
作者:
P
Philip Warner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- Support for iscachable when dumping functions
上级
7f6e021c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
4 deletion
+16
-4
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.c
+14
-3
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_dump.h
+2
-1
未找到文件。
src/bin/pg_dump/pg_dump.c
浏览文件 @
74e33110
...
...
@@ -22,7 +22,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.16
2 2000/08/01 15:51:4
4 pjw Exp $
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.16
3 2000/08/07 12:32:5
4 pjw Exp $
*
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
*
...
...
@@ -1714,13 +1714,15 @@ getFuncs(int *numFuncs)
int
i_proretset
;
int
i_prosrc
;
int
i_probin
;
int
i_iscachable
;
int
i_usename
;
/* find all user-defined funcs */
appendPQExpBuffer
(
query
,
"SELECT pg_proc.oid, proname, prolang, pronargs, prorettype, "
"proretset, proargtypes, prosrc, probin, usename "
"proretset, proargtypes, prosrc, probin, usename, "
"proiscachable "
"from pg_proc, pg_user "
"where pg_proc.oid > '%u'::oid and proowner = usesysid"
,
g_last_builtin_oid
);
...
...
@@ -1751,6 +1753,7 @@ getFuncs(int *numFuncs)
i_proretset
=
PQfnumber
(
res
,
"proretset"
);
i_prosrc
=
PQfnumber
(
res
,
"prosrc"
);
i_probin
=
PQfnumber
(
res
,
"probin"
);
i_iscachable
=
PQfnumber
(
res
,
"proiscachable"
);
i_usename
=
PQfnumber
(
res
,
"usename"
);
for
(
i
=
0
;
i
<
ntups
;
i
++
)
...
...
@@ -1766,6 +1769,7 @@ getFuncs(int *numFuncs)
finfo
[
i
].
nargs
=
atoi
(
PQgetvalue
(
res
,
i
,
i_pronargs
));
finfo
[
i
].
lang
=
atoi
(
PQgetvalue
(
res
,
i
,
i_prolang
));
finfo
[
i
].
usename
=
strdup
(
PQgetvalue
(
res
,
i
,
i_usename
));
finfo
[
i
].
iscachable
=
(
strcmp
(
PQgetvalue
(
res
,
i
,
i_iscachable
),
"t"
)
==
0
);
if
(
finfo
[
i
].
nargs
<
0
||
finfo
[
i
].
nargs
>
FUNC_MAX_ARGS
)
{
fprintf
(
stderr
,
"failed sanity check: %s has %d args
\n
"
,
...
...
@@ -2923,11 +2927,18 @@ dumpOneFunc(Archive *fout, FuncInfo *finfo, int i,
resetPQExpBuffer
(
q
);
appendPQExpBuffer
(
q
,
"CREATE FUNCTION %s "
,
fn
->
data
);
appendPQExpBuffer
(
q
,
"RETURNS %s%s %s LANGUAGE '%s'
;
\n
"
,
appendPQExpBuffer
(
q
,
"RETURNS %s%s %s LANGUAGE '%s'"
,
(
finfo
[
i
].
retset
)
?
" SETOF "
:
""
,
fmtId
(
findTypeByOid
(
tinfo
,
numTypes
,
finfo
[
i
].
prorettype
),
false
),
asPart
->
data
,
func_lang
);
if
(
finfo
[
i
].
iscachable
)
/* OR in new attrs here */
{
appendPQExpBuffer
(
q
,
" WITH (iscachable)"
);
}
appendPQExpBuffer
(
q
,
";
\n
"
);
ArchiveEntry
(
fout
,
finfo
[
i
].
oid
,
fn
->
data
,
"FUNCTION"
,
NULL
,
q
->
data
,
delqry
->
data
,
""
,
finfo
[
i
].
usename
,
NULL
,
NULL
);
...
...
src/bin/pg_dump/pg_dump.h
浏览文件 @
74e33110
...
...
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_dump.h,v 1.5
0 2000/07/17 03:05:20 tgl
Exp $
* $Id: pg_dump.h,v 1.5
1 2000/08/07 12:32:54 pjw
Exp $
*
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
*
...
...
@@ -62,6 +62,7 @@ typedef struct _funcInfo
char
*
prosrc
;
char
*
probin
;
char
*
usename
;
int
iscachable
;
/* Attr */
int
dumped
;
/* 1 if already dumped */
}
FuncInfo
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录