Hi,
On 6/4/05, Daniel Verite <daniel@manitou-mail.org> wrote:
> Are you passing a NULL pointer in paramLengths? You need to
> pass an array containing the actual length of your binary data.
Yes, paramLengthts is a NULL pointer. But, is SegFault an expected result?
Himms... When I take a look at src/interfaces/libpq/fe-exec.c:
956 if (paramValues && paramValues[i])
957 {
958 int nbytes;
960 if (paramFormats && paramFormats[i] != 0)
961 {
962 /* binary parameter */
963 nbytes = paramLengths[i];
It appears to be SegFault was caused by paramLengths[i] on line 963.
So, this means, user _has_to_ specify the size of input while using
binary data. Maybe a "if ( paramLengths )" check can be useful.
Regards.