Re: libpq, PQExecParams and the inserting of binary data - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: libpq, PQExecParams and the inserting of binary data
Date
Msg-id 12005.1117825882@sss.pgh.pa.us
Whole thread Raw
In response to Re: libpq, PQExecParams and the inserting of binary data  (David Hinkle <drachs@gmail.com>)
List pgsql-interfaces
David Hinkle <drachs@gmail.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


pgsql-interfaces by date:

Previous
From: David Hinkle
Date:
Subject: Re: libpq, PQExecParams and the inserting of binary data
Next
From: "Daniel Verite"
Date:
Subject: Re: libpq, PQExecParams and the inserting of binary data