Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
ba9da684
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,发现更多精彩内容 >>
提交
ba9da684
编写于
12月 01, 2007
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Suppress compiler warnings in recent plperl patch. Avoid uselessly expensive
lookup of the well-known OID of textout().
上级
b8f28759
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
21 deletion
+9
-21
src/pl/plperl/plperl.c
src/pl/plperl/plperl.c
+9
-21
未找到文件。
src/pl/plperl/plperl.c
浏览文件 @
ba9da684
/**********************************************************************
* plperl.c - perl as a procedural language for PostgreSQL
*
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.13
3 2007/12/01 15:20:34 adunstan
Exp $
* $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.13
4 2007/12/01 17:58:42 tgl
Exp $
*
**********************************************************************/
...
...
@@ -23,6 +23,7 @@
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "parser/parse_type.h"
#include "utils/fmgroids.h"
#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
...
...
@@ -508,7 +509,6 @@ plperl_safe_init(void)
eval_pv
(
SAFE_OK
,
FALSE
);
if
(
GetDatabaseEncoding
()
==
PG_UTF8
)
{
/*
* Fill in just enough information to set up this perl
* function in the safe container and call it.
...
...
@@ -516,12 +516,8 @@ plperl_safe_init(void)
* can arise from the regex code later trying to load
* utf8 modules.
*/
plperl_proc_desc
desc
;
FunctionCallInfoData
fcinfo
;
FmgrInfo
outfunc
;
HeapTuple
typeTup
;
Form_pg_type
typeStruct
;
SV
*
ret
;
SV
*
func
;
...
...
@@ -529,29 +525,21 @@ plperl_safe_init(void)
plperl_safe_init_done
=
true
;
/* compile the function */
func
=
plperl_create_sub
(
"utf8fix"
,
"return shift =~ /
\\
xa9/i ? 'true' : 'false' ;"
,
true
);
func
=
plperl_create_sub
(
"utf8fix"
,
"return shift =~ /
\\
xa9/i ? 'true' : 'false' ;"
,
true
);
/* set up to call the function with a single text argument 'a' */
desc
.
reference
=
func
;
desc
.
nargs
=
1
;
desc
.
arg_is_rowtype
[
0
]
=
false
;
fmgr_info
(
F_TEXTOUT
,
&
(
desc
.
arg_out_func
[
0
]));
fcinfo
.
arg
[
0
]
=
DirectFunctionCall1
(
textin
,
CStringGetDatum
(
"a"
));
fcinfo
.
argnull
[
0
]
=
false
;
fcinfo
.
arg
[
0
]
=
DatumGetTextP
(
DirectFunctionCall1
(
textin
,
CStringGetDatum
(
"a"
)));
typeTup
=
SearchSysCache
(
TYPEOID
,
TEXTOID
,
0
,
0
,
0
);
typeStruct
=
(
Form_pg_type
)
GETSTRUCT
(
typeTup
);
fmgr_info
(
typeStruct
->
typoutput
,
&
(
desc
.
arg_out_func
[
0
]));
ReleaseSysCache
(
typeTup
);
/* and make the call */
ret
=
plperl_call_perl_func
(
&
desc
,
&
fcinfo
);
ret
=
plperl_call_perl_func
(
&
desc
,
&
fcinfo
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录