Re: question regarding cursors in plpgsql, declare and bound params (v3 protocol) - Mailing list pgsql-general

From Tom Lane
Subject Re: question regarding cursors in plpgsql, declare and bound params (v3 protocol)
Date
Msg-id 16479.1083792243@sss.pgh.pa.us
Whole thread Raw
In response to question regarding cursors in plpgsql, declare and bound params (v3 protocol)  (Igor Shevchenko <igor@carcass.ath.cx>)
List 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 by date:

Previous
From: Doug Hall
Date:
Subject: Listing databases
Next
From: "scott.marlowe"
Date:
Subject: Re: Listing databases