projects
/
postgresql
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f6d011
)
Fixed test for array boundary.
author
Michael Meskes
<meskes@postgresql.org>
Fri, 5 Oct 2012 14:37:45 +0000
(16:37 +0200)
committer
Michael Meskes
<meskes@postgresql.org>
Fri, 5 Oct 2012 15:05:53 +0000
(17:05 +0200)
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.
src/interfaces/ecpg/ecpglib/data.c
patch
|
blob
|
history
diff --git
a/src/interfaces/ecpg/ecpglib/data.c
b/src/interfaces/ecpg/ecpglib/data.c
index 79af7b1ebb0cc8477f4a9f4f7fbb77b6f3f4ea98..436e74966c55a43e515e99b2733e49f0dbc3a9e1 100644
(file)
--- 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);
}