Re: libpq, PQExecParams and the inserting of binary data

From: "Daniel Verite" <daniel(at)manitou-mail(dot)org>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq, PQExecParams and the inserting of binary data
Date: 2005-06-04 13:36:20
Message-ID: 20050604153734.8397528@uruguay
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Volkan YAZICI wrote:

> res = PQexecParams(conn, command, nParams, paramTypes, paramValues,
> paramLengths, paramFormats, resultFormat);
[...]
> Above code is working well for me. But while trying some other
> combinations (out of NULL usage) for PQexecParams parameters, I
> realized that when we use "const int paramFormats[] = {1};" execution
> dumps SegFault:

Are you passing a NULL pointer in paramLengths? You need to
pass an array containing the actual length of your binary data.

--
Daniel
PostgreSQL-powered mail user agent and storage: http://www.manitou-mail.org

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Volkan YAZICI 2005-06-04 13:52:27 Re: libpq, PQExecParams and the inserting of binary data
Previous Message Volkan YAZICI 2005-06-04 08:22:38 Re: libpq, PQExecParams and the inserting of binary data