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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Igor Shevchenko <igor(at)carcass(dot)ath(dot)cx>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: question regarding cursors in plpgsql, declare and bound params (v3 protocol)
Date: 2004-05-05 21:24:03
Message-ID: 16479.1083792243@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Igor Shevchenko <igor(at)carcass(dot)ath(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2004-05-05 21:39:00 Re: Listing databases
Previous Message Doug Hall 2004-05-05 21:20:29 Listing databases