pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Cornelia Boenigk <poppcorn@cornelia-boenigk.de>
To: pgsql-general@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: problem with cursur within a scriptfile
Date: Sun, 22 Feb 2004 17:50:55 +0100
Message-ID: <00f201c3f964$2d68baf0$0201a8c0@zwerg2000> (raw)
References: <296d84e62fc40fc6e1938b7086259dac@biglumber.com>

Hi everybody

I defined a function returning refcursor.

CREATE FUNCTION cursorname (refcursor, character varying, character
varying) RETURNS refcursor ...
which does a select with username and serachphrase.

If I call

BEGIN;
SELECT cursorname(`test`,`username`,`searchphrase`);
MOVE 10 in test;
FETCH 25 from test;
COMMIT;

inside psql everything works well. If I put this code into a
scriptfile and call it, I get the following errormessage:

cannot handle multiple result groups

Why? What does this mean?

I use a webserver which has 'one' persistent connection to the
database. Executing the script the connection breaks. Trying to do a
rollback the database returns that there is no transaction in
progress.

Any help is welcome

Regards
Conni




view thread (4+ messages)  latest in thread

Message-ID: <00f201c3f964$2d68baf0$0201a8c0@zwerg2000>
Permalink:  ../00f201c3f964$2d68baf0$0201a8c0@zwerg2000/
Also on:    postgresql.org/message-id/00f201c3f964$2d68baf0$0201a8c0@zwerg2000

 · 

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: poppcorn@cornelia-boenigk.de, pgsql-general@postgresql.org
  Subject: Re: problem with cursur within a scriptfile
  In-Reply-To: <00f201c3f964$2d68baf0$0201a8c0@zwerg2000>

* 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