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:44 +0100 |
commit | 7a35507acceb07c4ed1a7a0c82db50eee3101df3 (patch) | |
tree | 984e155de6992fd1c388cef6f932ae90b5c3b1fe | |
parent | f05ae2fa94b4e8c8fae4ccbc8d79cfbaa6a0e7b2 (diff) | |
download | postgresql-7a35507acceb07c4ed1a7a0c82db50eee3101df3.tar.gz postgresql-7a35507acceb07c4ed1a7a0c82db50eee3101df3.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 46eda33241e..4c9cdccdc0a 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); |