From: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
---|---|
To: | "Eugene E(dot)" <sad(at)bankir(dot)ru> |
Cc: | postgresql sql list <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: have you feel anything when you read this ? |
Date: | 2006-04-04 11:05:41 |
Message-ID: | C5B23B63-8483-426D-BA2F-74674FF3F06D@myrealbox.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Apr 4, 2006, at 19:30 , Eugene E. wrote:
> Stephan Szabo wrote:
>> On Fri, 31 Mar 2006, Eugene E. wrote:
>>> Peter Eisentraut wrote:
>>>
>> No, that is still using the textual form. If you use PQexecParams
>> and set
>> the last argument to show you want binary data, you should get binary
>> data.
>
> Documentation says:
> ===
> PQexecParams
>
> Submits a command to the server and waits for the result, with
> the ability to pass parameters separately from the SQL command text.
> ===
>
> How should i use this func to change so-called "textual form" of a
> select-result to so-called "binary form" ?
It looks like you quoted
http://www.postgresql.org/docs/8.1/interactive/libpq-exec.html#AEN25123
If you read the rest of the explanation of PQexecParams, I think
you'll find the answer you're looking for. (Please note I don't have
any experience using libpq. I'm just trying to help you find an
answer to your question.)
The usage block includes the parameters PQexecParams accepts.
> PGresult *PQexecParams(PGconn *conn,
> const char *command,
> int nParams,
> const Oid *paramTypes,
> const char * const *paramValues,
> const int *paramLengths,
> const int *paramFormats,
> int resultFormat);
That last parameter (resultFormat) looks promising.
The next sentence gives query result formats:
> PQexecParams is like PQexec, but offers additional functionality:
> parameter values can be specified separately from the command
> string proper, and query results can be requested in either text or
> binary format.
And in the next paragraph:
> ... resultFormat is zero to obtain results in text format, or one
> to obtain results in binary format. ...
Hope this helps.
Michael Glaesemann
grzm myrealbox com
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2006-04-04 14:21:21 | Re: have you feel anything when you read this ? |
Previous Message | Eugene E. | 2006-04-04 10:30:14 | Re: have you feel anything when you read this ? |