Re: Issue with PQdescribePortal to describe a select cursor

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Issue with PQdescribePortal to describe a select cursor
Дата
Msg-id 29464.1188322195@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Issue with PQdescribePortal to describe a select cursor  ("Brijesh Shrivastav" <Bshrivastav@esri.com>)
Ответы Re: Issue with PQdescribePortal to describe a select cursor  ("Brijesh Shrivastav" <Bshrivastav@esri.com>)
Список pgsql-interfaces
"Brijesh Shrivastav" <Bshrivastav@esri.com> writes:
> Please see the test program below that creates a table and then
> queries it using DECLARE CURSOR statement.

Well, you only prepared the DECLARE CURSOR command, you didn't execute
it --- so there's no cursor, only a prepared statement sitting waiting
to be used.

Once you execute the DECLARE CURSOR, you should be able to describe its
portal in advance of fetching any rows from it.  Or is that not what
you wanted?

> ... (in many
> cases I need input bind parameter data from client application
> before executing the query).

I think you might be looking for Describe Statement (on a prepared
statement) rather than Describe Portal.  You have to have already
provided parameter values in order to have a portal at all...
        regards, tom lane


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

Предыдущее
От: "Brijesh Shrivastav"
Дата:
Сообщение: Re: Issue with PQdescribePortal to describe a select cursor
Следующее
От: "Brijesh Shrivastav"
Дата:
Сообщение: Re: Issue with PQdescribePortal to describe a select cursor