Re: psql: Add command to use extended query protocol

Поиск
Список
Период
Сортировка
От Tobias Bussmann
Тема Re: psql: Add command to use extended query protocol
Дата
Msg-id 53A726DF-E045-458A-9A59-C0B2F8835DD2@gmx.net
обсуждение исходный текст
Ответ на Re: psql: Add command to use extended query protocol  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Ответы Re: psql: Add command to use extended query protocol  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Список pgsql-hackers
In one of my environments, this feature didn't work as expected. Digging into it, I found that it is incompatible with
FETCH_COUNTbeing set. Sorry for not recognising this during the betas. 

Attached a simple patch with tests running the cursor declaration through PQexecParams instead of PGexec.

Alternatively, we could avoid going to ExecQueryUsingCursor and force execution via ExecQueryAndProcessResults in
SendQuery(around line 1134 in src/bin/psql/common.c) when \bind is used: 

    else if (pset.fetch_count <= 0 || pset.gexec_flag ||
-             pset.crosstab_flag || !is_select_command(query))
+             pset.crosstab_flag || !is_select_command(query) ||
+             pset.bind_flag)

best regards
Tobias


Вложения

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

Предыдущее
От: stepan rutz
Дата:
Сообщение: Re: Detoasting optionally to make Explain-Analyze less misleading
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: [PATCH] Add CANONICAL option to xmlserialize