Skip site navigation (1) Skip section navigation (2)

Re: libpq, PQExecParams and the inserting of binary data

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Hinkle <drachs(at)gmail(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq, PQExecParams and the inserting of binary data
Date: 2005-06-03 19:11:22
Message-ID: 12005.1117825882@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
David Hinkle <drachs(at)gmail(dot)com> writes:
> ...  That example doesn't show you how to use
> any binary parameters... All the parameters are text, it only shows
> you how get binary results.  I think it's a huge oversight myself.

Duh, you are right.  Will fix that.

> I could probably figure out how to use the parameters as binary, but I
> have no idea what to do with the OID field.

If you didn't need it for the text version, you won't need it for the
binary version.  The type OID is only needed if the query is such that
the backend can't determine the type of the parameter symbol from
context.  Whether you send the parameter value as text or binary has
nada to do with that.

			regards, tom lane

In response to

pgsql-interfaces by date

Next:From: Daniel VeriteDate: 2005-06-03 19:20:00
Subject: Re: libpq, PQExecParams and the inserting of binary data
Previous:From: David HinkleDate: 2005-06-03 19:00:51
Subject: Re: libpq, PQExecParams and the inserting of binary data

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group