Re: "unsupported format code: 36" in prepared statement with libpq-fe 9.2.5

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Raymond C(dot) Rodgers" <sinful622(at)gmail(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: "unsupported format code: 36" in prepared statement with libpq-fe 9.2.5
Date: 2014-01-09 15:56:18
Message-ID: 26939.1389282978@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

"Raymond C. Rodgers" <sinful622(at)gmail(dot)com> writes:
> I haven't been working with libpq-fe for long (only the last month or
> so) but I've had the good fortune of being able to figure out and solve
> most problems I've encountered within a few minutes to an hour, but this
> one is different.

I think you're going to kick yourself:

> PQexecPrepared(DB,"insertData",12,value,format,length,1);

You've given "format" and "length" in the wrong order, so it's trying
to interpret some field length as a format code.

regards, tom lane

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Greg Sabino Mullane 2014-02-05 14:33:54 DBD::Pg 3.0.0, Perl driver for PostgreSQL, released
Previous Message Raymond C. Rodgers 2014-01-09 15:25:43 "unsupported format code: 36" in prepared statement with libpq-fe 9.2.5