Hi,
there isn't any interface for using cursors within libpq, I'll do with a
PQexec(conn,"DECLARE..."); and fetch.
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) :
PREPARE plan_name(int) AS SELECT * FROM abc WHERE a = $1;
DECLARE cur CURSOR FOR EXECUTE(3);
doing so, I get a 'syntax error at or near "EXECUTE" at character 24'
Is something wrong or is it just not supported by postgres?
Manual talks about read only cursors but I didn't find out discussions about
"anti-prepared-statement-cursors".
I'm using postgres-8.1.4.
Any help appreciated!
Thanks
Charles