Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

cursors on prepared queries



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


Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group