problem with cursur within a scriptfile

From: "Cornelia Boenigk" <poppcorn(at)cornelia-boenigk(dot)de>
To: <pgsql-general(at)postgresql(dot)org>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: problem with cursur within a scriptfile
Date: 2004-02-22 16:50:55
Message-ID: 00f201c3f964$2d68baf0$0201a8c0@zwerg2000
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-interfaces

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2004-02-22 17:11:34 Re: problem with cursur within a scriptfile
Previous Message greg 2004-02-22 12:33:34 DBD::Pg 1.32 ready for testing

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bill Moran 2004-02-22 17:11:34 Re: problem with cursur within a scriptfile
Previous Message Wong Eric 2004-02-22 14:12:20 Re: create large object by tcl