X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5DFC1D1B4E2 for ; Sun, 5 Oct 2003 08:41:55 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 81767-10 for ; Sun, 5 Oct 2003 05:41:11 -0300 (ADT) Received: from mail.nucleus.com (mail.nucleus.com [207.34.93.23]) by svr1.postgresql.org (Postfix) with ESMTP id DEBE8D1B4E3 for ; Sun, 5 Oct 2003 05:40:53 -0300 (ADT) Received: from dsl-mtryl-209-5-169-111-cgy.nucleus.com (unverified [209.5.169.111]) by mail.nucleus.com (Vircom SMTPRS 2.1.268) with ESMTP id ; Sun, 5 Oct 2003 02:40:39 -0600 From: "Andrew J. Kopciuch" Reply-To: akopciuch@olympusproject.org Organization: Olympus Open Source Project To: sebastien.baudry@baudry-engineering.com, Sebastien BAUDRY , pgsql-php@postgresql.org Subject: Re: How to manipulate a cursor returned by a PL/pgSQL in a PHP script? Date: Sun, 5 Oct 2003 02:38:36 -0600 User-Agent: KMail/1.5 References: <20031005073201.91481.qmail@web13807.mail.yahoo.com> In-Reply-To: <20031005073201.91481.qmail@web13807.mail.yahoo.com> X-MailKey: Flyers winning makes BDDF happy MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200310050238.37577.akopciuch@olympusproject.org> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/9 X-Sequence-Number: 2370 On Sunday 05 October 2003 01:32, Sebastien BAUDRY wrote: > Hi. > My function returns a cursor and I don't know how to > fetch the cursor in my PHP script. > Anybody could help me? > PHP does not directly support cursors under PostgreSQL. :-( From some quick looking on the web it seems you can hack your way around it in PHP by using the ODBC functions (which do support cursors). Are you porting an application from a different RDBMS (like Oracle) by any chance? Again from the web, I have found that one reason for the lack of cursor support is that it is not as critical for performance (as it would be in Oracle). Maybe the use of LIMIT and OFFSET in postgres would help you. (Those are not supported in Oracle ... correct me if I am wrong). Andy