diff options
author | Michael Meskes <meskes@postgresql.org> | 2017-11-02 20:46:34 +0100 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2017-11-02 20:51:34 +0100 |
commit | ad24e7bc28d45b180726d6ff144e58d67e73aaa4 (patch) | |
tree | 5caabf0049ae0d9b46f552d0e09ed273d789d3a9 | |
parent | ef0339ee5dcf933949f3751d98771e03b8c19aa2 (diff) | |
download | postgresql-ad24e7bc28d45b180726d6ff144e58d67e73aaa4.tar.gz postgresql-ad24e7bc28d45b180726d6ff144e58d67e73aaa4.zip |
Fix float parsing in ecpg INFORMIX mode.
-rw-r--r-- | src/interfaces/ecpg/ecpglib/data.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index 51d187dfa62..4c371d4fa96 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -59,7 +59,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; } @@ -402,7 +402,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); |