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:07:31 +0200 |
commit | c413015fd488ae3ce660efeea182faec244bab5d (patch) | |
tree | b005f915ec1d5feaa78982d346e0c6a73828f7b8 | |
parent | cb4083dfbbda97eb2b23111a3093c417d8a7d41a (diff) | |
download | postgresql-c413015fd488ae3ce660efeea182faec244bab5d.tar.gz postgresql-c413015fd488ae3ce660efeea182faec244bab5d.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.
-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 db975035df9..dcccd924ece 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); } |