Search Postgresql Archives

Re: return value for PQbinaryTuples

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 2, 2009 at 12:28 PM, Daniel Verite <daniel@xxxxxxxxxxxxxxxx> wrote:
>        Merlin Moncure wrote:
>
>> PQbinaryTuples is basically going to return whatever you passed into
>> resultformat when you executed the query (in the case of PQexec, it's
>> going to be 1 always).
>
> You mean 0 (i.e. text, not binary). And with an exception on PQexec("FETCH
> c") when c is a binary cursor. In this case the result is binary and
> PQbinaryTuples() reflects that.

quite right! I had completely forgotten about binary cursors (which
are, IMO, a total hack).

merlin

silonet=# declare test_cursor binary cursor with hold for select
1094795585::int;
DECLARE CURSOR
Time: 0.327 ms
silonet=# fetch from test_cursor;
 int4
──────
 AAAA
(1 row)

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux