X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 5732A11F6006 for ; Tue, 4 Apr 2006 08:05:51 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 83319-01 for ; Tue, 4 Apr 2006 08:05:50 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [151.155.5.143]) by postgresql.org (Postfix) with ESMTP id E6C9F11F65FB for ; Tue, 4 Apr 2006 08:05:48 -0300 (ADT) Received: from [172.16.1.180] grzm [61.197.227.146] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 1.6 $ on Linux; Tue, 04 Apr 2006 05:05:44 -0600 In-Reply-To: <44324AB6.2060104@bankir.ru> References: <441EA0A7.8030601@bankir.ru> <200603201415.30719.peter_e@gmx.net> <442CC95C.1030700@bankir.ru> <20060331084503.W64402@megazone.bigpanda.com> <44324AB6.2060104@bankir.ru> Mime-Version: 1.0 (Apple Message framework v746.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: postgresql sql list Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: have you feel anything when you read this ? Date: Tue, 4 Apr 2006 20:05:41 +0900 To: "Eugene E." X-Mailer: Apple Mail (2.746.3) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.114 required=5 tests=[AWL=-0.218, RCVD_IN_BL_SPAMCOP_NET=1.332] X-Spam-Score: 1.114 X-Spam-Level: * X-Archive-Number: 200604/12 X-Sequence-Number: 24821 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