Skip site navigation (1) Skip section navigation (2)

Re: How to manipulate a cursor returned by a PL/pgSQL in a PHP script?

From: "Andrew J(dot) Kopciuch" <akopciuch(at)olympusproject(dot)org>
To: sebastien(dot)baudry(at)baudry-engineering(dot)com,Sebastien BAUDRY <sbaudry(at)yahoo(dot)com>, pgsql-php(at)postgresql(dot)org
Subject: Re: How to manipulate a cursor returned by a PL/pgSQL in a PHP script?
Date: 2003-10-05 08:38:36
Message-ID: 200310050238.37577.akopciuch@olympusproject.org (view raw or flat)
Thread:
Lists: pgsql-php
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

In response to

Responses

pgsql-php by date

Next:From: Rod TaylorDate: 2003-10-05 12:22:02
Subject: Re: How to manipulate a cursor returned by a PL/pgSQL in a PHP
Previous:From: Sebastien BAUDRYDate: 2003-10-05 07:32:01
Subject: How to manipulate a cursor returned by a PL/pgSQL in a PHP script?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group