pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jeroen T. Vermeulen <jtv@xs4all.nl>
To: Andro <andromede@gmail.com>
Cc: pgsql-interfaces@postgresql.org
Subject: Re: cursors on prepared queries
Date: Tue, 12 Sep 2006 17:47:45 +0700 (ICT)
Message-ID: <24793.125.24.222.234.1158058065.squirrel@webmail.xs4all.nl> (raw)
In-Reply-To: <da7021e0609120318u2b6a6ca2wb744d692487c0ac2@mail.gmail.com>
References: <da7021e0609120318u2b6a6ca2wb744d692487c0ac2@mail.gmail.com>

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





view thread (4+ messages)  latest in thread

Message-ID: <24793.125.24.222.234.1158058065.squirrel@webmail.xs4all.nl>
Permalink:  ../24793.125.24.222.234.1158058065.squirrel@webmail.xs4all.nl/
Also on:    postgresql.org/message-id/24793.125.24.222.234.1158058065.squirrel@webmail.xs4all.nl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: jtv@xs4all.nl, andromede@gmail.com
  Subject: Re: cursors on prepared queries
  In-Reply-To: <24793.125.24.222.234.1158058065.squirrel@webmail.xs4all.nl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox