Re: return value for PQbinaryTuples

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: return value for PQbinaryTuples
Дата
Msg-id b42b73150912021249y58106e13hb1775ed8ab0c86c1@mail.gmail.com
обсуждение исходный текст
Ответ на Re: return value for PQbinaryTuples  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-general
On Wed, Dec 2, 2009 at 12:28 PM, Daniel Verite <daniel@manitou-mail.org> 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)

В списке pgsql-general по дате отправления:

Предыдущее
От: Rob W
Дата:
Сообщение: Query using partitioned table hangs
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Catastrophic changes to PostgreSQL 8.4