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

Cursor Alternative

From: Charles Sullivan <casullivan(at)creativeduck(dot)ca>
To: pgsql-novice postgres <pgsql-novice(at)postgresql(dot)org>
Subject: Cursor Alternative
Date: 2007-09-17 20:17:52
Message-ID: 0DD98720-AFEA-4A89-BCF9-0B37EB29931A@creativeduck.ca (view raw or flat)
Thread:
Lists: pgsql-novice
I like the pgsql cursor. However, the instance that I need it in,  
which utilizes Zend Framework, does not allow persistent connections  
and therefore cannot use it. Some writings have suggested making a  
function utilizing  for and while loops.

Being a relative newbie, I get the concept of the loops but don't  
understand how I could write a function where every time the function  
is called, it increments one row from the current row in the user  
session and consequently displays only the one row in the result set.

If anyone could help me with some small snippets of samples, or  
suggestions where to look for further information on postgres cursor  
alternatives, that would be greatly appreciated.

Charles Sullivan


pgsql-novice by date

Next:From: Oeschey, Lars (I/EK-142, extern)Date: 2007-09-18 07:25:48
Subject: Relation does not exist problem
Previous:From: Bima DjaloeisDate: 2007-09-17 16:50:46
Subject: ON INSERT => execute AWK/SH/EXE?

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