projects
/
postgres-xl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97ba7b8
)
Fix float parsing in ecpg INFORMIX mode.
author
Michael Meskes
<
[email protected]
>
Thu, 2 Nov 2017 19:46:34 +0000
(20:46 +0100)
committer
Michael Meskes
<
[email protected]
>
Thu, 2 Nov 2017 19:51:00 +0000
(20:51 +0100)
src/interfaces/ecpg/ecpglib/data.c
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/ecpg/ecpglib/data.c
b/src/interfaces/ecpg/ecpglib/data.c
index fd947b2bf1748a4f7db9216fa2ae057528fb9e03..b866b1ab5a99d8f1dbae0ae9f6ed3495c02d0add 100644
(file)
--- a/
src/interfaces/ecpg/ecpglib/data.c
+++ b/
src/interfaces/ecpg/ecpglib/data.c
@@
-57,7
+57,7
@@
garbage_left(enum ARRAY_TYPE isarray, char **scan_length, enum COMPAT_MODE compa
/* skip invalid characters */
do {
(*scan_length)++;
- } while (
**scan_length != ' ' && **scan_length != '\0' &&
isdigit(**scan_length));
+ } while (isdigit(**scan_length));
return false;
}
@@
-401,7
+401,8
@@
ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
if (isarray && *scan_length == '"')
scan_length++;
- if (garbage_left(isarray, &scan_length, compat))
+ /* no special INFORMIX treatment for floats */
+ if (garbage_left(isarray, &scan_length, ECPG_COMPAT_PGSQL))
{
ecpg_raise(lineno, ECPG_FLOAT_FORMAT,
ECPG_SQLSTATE_DATATYPE_MISMATCH, pval);