diff options
author | Michael Meskes <meskes@postgresql.org> | 2016-08-01 06:36:27 +0200 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2016-08-01 15:08:12 +0200 |
commit | 3ebc88e568053fa16766e05155eb005cc72978db (patch) | |
tree | cfc84c5e499158df4b47f572f1bc13d22f6aaa02 | |
parent | 74d8c95b7456faefdd4244acf854361711fb42ce (diff) | |
download | postgresql-3ebc88e568053fa16766e05155eb005cc72978db.tar.gz postgresql-3ebc88e568053fa16766e05155eb005cc72978db.zip |
Fixed array checking code for "unsigned long long" datatypes in libecpg.
-rw-r--r-- | src/interfaces/ecpg/ecpglib/data.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index 82ab4aaf868..23646a95791 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -375,8 +375,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, #ifdef HAVE_STRTOULL case ECPGt_unsigned_long_long: *((unsigned long long int *) (var + offset * act_tuple)) = strtoull(pval, &scan_length, 10); - if ((isarray && *scan_length != ',' && *scan_length != '}') - || (!isarray && !(INFORMIX_MODE(compat) && *scan_length == '.') && *scan_length != '\0' && *scan_length != ' ')) /* Garbage left */ + if (garbage_left(isarray, scan_length, compat)) { ecpg_raise(lineno, ECPG_UINT_FORMAT, ECPG_SQLSTATE_DATATYPE_MISMATCH, pval); return (false); |