Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
b2d9fbee
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,发现更多精彩内容 >>
提交
b2d9fbee
编写于
8月 11, 2004
作者:
T
Tom Lane
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Work around broken strtod() that's present in many Solaris releases.
Thanks to Michael Fuhr for identifying the problem.
上级
178ec6f4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
33 addition
and
2 deletion
+33
-2
src/backend/utils/adt/float.c
src/backend/utils/adt/float.c
+25
-1
src/include/port/solaris.h
src/include/port/solaris.h
+8
-1
未找到文件。
src/backend/utils/adt/float.c
浏览文件 @
b2d9fbee
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
*
*
*
*
* IDENTIFICATION
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.10
6 2004/08/04 21:34:02
tgl Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.10
7 2004/08/11 17:20:49
tgl Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -317,6 +317,18 @@ float4in(PG_FUNCTION_ARGS)
...
@@ -317,6 +317,18 @@ float4in(PG_FUNCTION_ARGS)
errmsg
(
"invalid input syntax for type real:
\"
%s
\"
"
,
errmsg
(
"invalid input syntax for type real:
\"
%s
\"
"
,
orig_num
)));
orig_num
)));
}
}
#ifdef HAVE_BUGGY_SOLARIS_STRTOD
else
{
/*
* Many versions of Solaris have a bug wherein strtod sets endptr
* to point one byte beyond the end of the string when given
* "inf" or "infinity".
*/
if
(
endptr
!=
num
&&
endptr
[
-
1
]
==
'\0'
)
endptr
--
;
}
#endif
/* HAVE_BUGGY_SOLARIS_STRTOD */
/* skip trailing whitespace */
/* skip trailing whitespace */
while
(
*
endptr
!=
'\0'
&&
isspace
((
unsigned
char
)
*
endptr
))
while
(
*
endptr
!=
'\0'
&&
isspace
((
unsigned
char
)
*
endptr
))
...
@@ -482,6 +494,18 @@ float8in(PG_FUNCTION_ARGS)
...
@@ -482,6 +494,18 @@ float8in(PG_FUNCTION_ARGS)
errmsg
(
"invalid input syntax for type double precision:
\"
%s
\"
"
,
errmsg
(
"invalid input syntax for type double precision:
\"
%s
\"
"
,
orig_num
)));
orig_num
)));
}
}
#ifdef HAVE_BUGGY_SOLARIS_STRTOD
else
{
/*
* Many versions of Solaris have a bug wherein strtod sets endptr
* to point one byte beyond the end of the string when given
* "inf" or "infinity".
*/
if
(
endptr
!=
num
&&
endptr
[
-
1
]
==
'\0'
)
endptr
--
;
}
#endif
/* HAVE_BUGGY_SOLARIS_STRTOD */
/* skip trailing whitespace */
/* skip trailing whitespace */
while
(
*
endptr
!=
'\0'
&&
isspace
((
unsigned
char
)
*
endptr
))
while
(
*
endptr
!=
'\0'
&&
isspace
((
unsigned
char
)
*
endptr
))
...
...
src/include/port/solaris.h
浏览文件 @
b2d9fbee
/* $PostgreSQL: pgsql/src/include/port/solaris.h,v 1.1
1 2004/03/15 03:29:22
tgl Exp $ */
/* $PostgreSQL: pgsql/src/include/port/solaris.h,v 1.1
2 2004/08/11 17:20:50
tgl Exp $ */
/*
/*
* Sort this out for all operating systems some time. The __xxx
* Sort this out for all operating systems some time. The __xxx
...
@@ -35,3 +35,10 @@
...
@@ -35,3 +35,10 @@
#define BYTE_ORDER LITTLE_ENDIAN
#define BYTE_ORDER LITTLE_ENDIAN
#endif
#endif
#endif
#endif
/*
* Many versions of Solaris have broken strtod() --- see bug #4751182.
* For the moment we just assume they all do; it's probably not worth
* the trouble to add a configure test for this.
*/
#define HAVE_BUGGY_SOLARIS_STRTOD
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录