Re: question regarding cursors in plpgsql, declare and bound params (v3 protocol)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: question regarding cursors in plpgsql, declare and bound params (v3 protocol)
Дата
Msg-id 16479.1083792243@sss.pgh.pa.us
обсуждение исходный текст
Ответ на question regarding cursors in plpgsql, declare and bound params (v3 protocol)  (Igor Shevchenko <igor@carcass.ath.cx>)
Список pgsql-general
Igor Shevchenko <igor@carcass.ath.cx> writes:
> -- all other queries are sent using PQsendQueryParams

> -- the bound parameter for $1 is sent with this query
> declare search_messages_cursor no scroll cursor for select
> folder_msg.message_id from folder_msg where folder_msg.folder_id=7866 and
> folder_msg.mail_subj ilike $1;

Hm.  That is not going to work, since the bound parameter only lasts for
the execution of the query (ie, the DECLARE).

Possibly someone could look into saving the parameters presented during
DECLARE along with the state of the cursor, but don't hold your breath
...

            regards, tom lane

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

Предыдущее
От: Doug Hall
Дата:
Сообщение: Listing databases
Следующее
От: "scott.marlowe"
Дата:
Сообщение: Re: Listing databases