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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-interfaces by date

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