diff options
author | Michael Meskes <meskes@postgresql.org> | 2012-10-05 16:37:45 +0200 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2012-10-05 17:06:44 +0200 |
commit | 856ce0fb563a630ddd07dfad8cb4d8eb1d601b77 (patch) | |
tree | 29b501fbba60b59a74a6a87d69d947a496c7bde9 /src | |
parent | 6c33084fa2eb1c1cce61def72d8eb7c91a69d525 (diff) | |
download | postgresql-856ce0fb563a630ddd07dfad8cb4d8eb1d601b77.tar.gz postgresql-856ce0fb563a630ddd07dfad8cb4d8eb1d601b77.zip |
Fixed test for array boundary.
Instead of continuing if the next character is not an array boundary get_data()
used to continue only on finding a boundary so it was not able to read any
element after the first.
Diffstat (limited to 'src')
-rw-r--r-- | src/interfaces/ecpg/ecpglib/data.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index fc0455607b7..dac9e4223a9 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -422,6 +422,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL); + pval++; break; } else if (pval[0] == 't' && pval[1] == '\0') @@ -434,6 +435,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, ecpg_raise(lineno, ECPG_CONVERT_BOOL, ECPG_SQLSTATE_DATATYPE_MISMATCH, NULL); + pval++; break; } else if (pval[0] == '\0' && PQgetisnull(results, act_tuple, act_field)) @@ -777,7 +779,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, ++pval; } } - } while (*pval != '\0' && array_boundary(isarray, *pval)); + } while (*pval != '\0' && !array_boundary(isarray, *pval)); return (true); } |