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

Re: cursors on prepared queries



On Tue, September 12, 2006 17:18, Andro wrote:

> PREPARE plan_name(int) AS SELECT * FROM abc WHERE a = $1;
> DECLARE cur CURSOR FOR EXECUTE(3);

(You'd probably also want to mention the name of the prepared statement
that you're executing somewhere :)

> 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".

Well, the documentation for DECLARE says that the query that cursor
executes must be a "SELECT command"--not that I personally know the
reasons behind it:

http://www.postgresql.org/docs/8.1/interactive/sql-declare.html


Jeroen





Home | Main Index | Thread Index

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