Re: libpq and prepared statements progress for 8.0

Поиск
Список
Период
Сортировка
От Abhijit Menon-Sen
Тема Re: libpq and prepared statements progress for 8.0
Дата
Msg-id 20040920063223.GA5183@penne.toroid.org
обсуждение исходный текст
Ответ на Re: libpq and prepared statements progress for 8.0  (Greg Stark <gsstark@mit.edu>)
Список pgsql-hackers
At 2004-09-20 02:16:50 -0400, gsstark@mit.edu wrote:
>
> Personally I find it annoying that you can't call describe on a
> statement, only a portal, but that's the way it is now.

No, it isn't. Describe accepts both prepared statement and portal names.
In the former case, it returns ParameterDescription message as well as
the RowDescriptions it returns for the latter.

> resultFormat is just a single integer in the protocol. You don't get
> to specify different formats for different columns.

Yes, you do. Bind accepts 0 (use the default text format), 1 (use this
format for all results), or as many result format specifiers as there
are results.

> What's nRows? None of the existing PQexec* take an nRows parameter.

Execute can be told to return no more than n rows of results. If there
are more rows available, the server returns PortalSuspended and awaits
another Execute message. The default of 0 imposes no limit.

Please read protocol-flow.html and protocol-message-formats.html.

-- ams


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

Предыдущее
От: "D'Arcy J.M. Cain"
Дата:
Сообщение: PostgreSQL 7.4 runs slower than 7.3
Следующее
От: Greg Stark
Дата:
Сообщение: Re: How to add locale support for each column?