Re: Question on libpq parameters

From: Owen Hartnett <owen(at)clipboardinc(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question on libpq parameters
Date: 2008-12-01 05:10:52
Message-ID: p0624080bc55909e690b1@[192.168.0.107]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

At 1:26 PM -0500 11/30/08, Tom Lane wrote:
>Owen Hartnett <owen(at)clipboardinc(dot)com> writes:
>> Yes, it did. I'm confused. My first parameter is a string, but the
>> following two are integers. I thought the paramType parameter
>> indicated the type. Do the integers need to be sprintf'd to strings?
>
>Yes.
>
>Alternatively, you could pass the integers as binary, but that's not
>notation-free either (you need htonl or some such).
>
> regards, tom lane

Thanks, that did it. I got confused with the binary parameters, and
PQgetvalue returning the binary through a char * when it returns a
binary value.

-Owen

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stéphane A. Schildknecht 2008-12-01 07:18:12 Re: Trigger before delete does fire before, but delete doesn't not happen
Previous Message Guy Rouillier 2008-11-30 23:51:09 Re: db backup script in gentoo