Re: [GENERAL] Question on libpq parameters

2008-12-01 Thread Merlin Moncure
On Mon, Dec 1, 2008 at 12:10 AM, Owen Hartnett [EMAIL PROTECTED] wrote: At 1:26 PM -0500 11/30/08, Tom Lane wrote: Owen Hartnett [EMAIL PROTECTED] writes: Yes, it did. I'm confused. My first parameter is a string, but the following two are integers. I thought the paramType parameter

Re: [GENERAL] Question on libpq parameters

2008-11-30 Thread Tom Lane
Owen Hartnett [EMAIL PROTECTED] 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

Re: [GENERAL] Question on libpq parameters

2008-11-30 Thread Owen Hartnett
At 1:26 PM -0500 11/30/08, Tom Lane wrote: Owen Hartnett [EMAIL PROTECTED] 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.

[GENERAL] Question on libpq parameters

2008-11-29 Thread Owen Hartnett
The following libpq code chokes on me with invalid input to an integer parameter (state == PGRES_FATAL_ERR aPtr == Error: Invalid Input syntax for integer . It fails on the call to PQexecPrepared. I suspect I'm not doing the parameters right. Can anyone spot anything wrong? Thanks,

Re: [GENERAL] Question on libpq parameters

2008-11-29 Thread Tom Lane
Owen Hartnett [EMAIL PROTECTED] writes: The following libpq code chokes on me with invalid input to an integer parameter (state == PGRES_FATAL_ERR aPtr == Error: Invalid Input syntax for integer . It fails on the call to PQexecPrepared. I suspect I'm not doing the parameters right. Can

Re: [GENERAL] Question on libpq parameters

2008-11-29 Thread Owen Hartnett
At 11:45 PM -0500 11/29/08, Tom Lane wrote: Owen Hartnett [EMAIL PROTECTED] writes: The following libpq code chokes on me with invalid input to an integer parameter (state == PGRES_FATAL_ERR aPtr == Error: Invalid Input syntax for integer . It fails on the call to PQexecPrepared. I