From: Volkan YAZICI <volkan.yazici@gmail.com>
To: Daniel Verite <daniel@manitou-mail.org>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: libpq, PQExecParams and the inserting of binary data
Date: Sat, 4 Jun 2005 16:52:27 +0300
Message-ID: <7104a737050604065267a108b@mail.gmail.com> (raw)
In-Reply-To: <20050604153734.8397528@uruguay>
References: <7104a73705060401222c6cc5d2@mail.gmail.com>
<20050604153734.8397528@uruguay>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: volkan.yazici@gmail.com, daniel@manitou-mail.org
Subject: Re: libpq, PQExecParams and the inserting of binary data
In-Reply-To: <7104a737050604065267a108b@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox