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 2B3E7D1BA0A for ; Sun, 22 Feb 2004 21:54:29 +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 74604-03 for ; Sun, 22 Feb 2004 17:54:29 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 31EE0D1BA13 for ; Sun, 22 Feb 2004 17:54:27 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i1MLsR6o018864; Sun, 22 Feb 2004 16:54:27 -0500 (EST) To: Bill Moran Cc: Cornelia Boenigk , pgsql-general@postgresql.org Subject: Re: problem with cursur within a scriptfile In-reply-to: <4038E2C6.6020108@potentialtech.com> References: <296d84e62fc40fc6e1938b7086259dac@biglumber.com> <00f201c3f964$2d68baf0$0201a8c0@zwerg2000> <4038E2C6.6020108@potentialtech.com> Comments: In-reply-to Bill Moran message dated "Sun, 22 Feb 2004 12:11:34 -0500" Date: Sun, 22 Feb 2004 16:54:27 -0500 Message-ID: <18863.1077486867@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/1011 X-Sequence-Number: 57722 Bill Moran writes: > Cornelia Boenigk wrote: >> 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 > Sure seems like whatever database client you're using doesn't really > support transactions. I'm guessing that the client-side library thinks the above is a single SQL statement, and so it's surprised when two result sets (the SELECT and then the FETCH) come back. This is probably due to misuse of the library API, but without any details it's hard to offer advice. regards, tom lane