cursors on prepared queries - Mailing list pgsql-interfaces

From Andro
Subject cursors on prepared queries
Date
Msg-id da7021e0609120318u2b6a6ca2wb744d692487c0ac2@mail.gmail.com
Whole thread Raw
Responses Re: cursors on prepared queries  ("Jeroen T. Vermeulen" <jtv@xs4all.nl>)
List pgsql-interfaces
Hi,<br /><br />there isn't any interface for using cursors within libpq, I'll do with a PQexec(conn,"DECLARE..."); and
fetch.<br/>Now I'd like to know if it's possible to prepare a query (that takes forever to plan) and execute it into a
cursor,like (SQL) : <br /><br />PREPARE plan_name(int) AS SELECT * FROM abc WHERE a = $1;<br />DECLARE cur CURSOR FOR
EXECUTE(3);<br/><br />doing so, I get a 'syntax error at or near "EXECUTE" at character 24'<br /><br />Is something
wrongor is it just not supported by postgres? <br />Manual talks about read only cursors but I didn't find out
discussionsabout "anti-prepared-statement-cursors".<br /><br />I'm using postgres-8.1.4.<br /><br />Any help
appreciated!<br/><br />Thanks<br /><br />Charles<br /> 

pgsql-interfaces by date:

Previous
From: "Bijay Singh Bisht"
Date:
Subject: ODBC Issue
Next
From: "Jeroen T. Vermeulen"
Date:
Subject: Re: cursors on prepared queries