X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 454A1D1B9EB for ; Sun, 22 Feb 2004 16:48:53 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 05140-09 for ; Sun, 22 Feb 2004 12:48:50 -0400 (AST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by svr1.postgresql.org (Postfix) with ESMTP id 9EF9AD1B9BB for ; Sun, 22 Feb 2004 12:48:49 -0400 (AST) Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1Auwme-0008DT-00 for pgsql-general@postgresql.org; Sun, 22 Feb 2004 17:48:48 +0100 Received: from [80.145.68.80] (helo=zwerg2000) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1Auwme-0006U4-00; Sun, 22 Feb 2004 17:48:48 +0100 Message-ID: <00f201c3f964$2d68baf0$0201a8c0@zwerg2000> From: "Cornelia Boenigk" To: Cc: References: <296d84e62fc40fc6e1938b7086259dac@biglumber.com> Subject: problem with cursur within a scriptfile Date: Sun, 22 Feb 2004 17:50:55 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:3729ab4bb5525dad81693a55f34190d5 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/1008 X-Sequence-Number: 57719 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