Re: return rows question - Mailing list pgsql-interfaces

From Laurette Cisneros
Subject Re: return rows question
Date
Msg-id Pine.LNX.4.44.0206150944190.20721-100000@visor.corp.nextbus.com
Whole thread Raw
In response to Re: return rows question  (Joe Conway <mail@joeconway.com>)
List pgsql-interfaces
Yeah, saw that too.  Thanks for all the help. 

L.
On Fri, 14 Jun 2002, Joe Conway wrote:

> Laurette Cisneros wrote:
> > Thanks.  I had looked into this.  But, it's not quite what I was looking
> > for.
> > 
> > I am writing a set of functions to act as an api to access data in the
> > database.  There are times when I would need to return a set of rows or
> > even a set of text from a pl/pgsql function based on some logic (no such
> > thing as logic in SQL).
> > 
> > Any ideas?
> > 
> > Thanks for the help,
> > 
> > L.
> 
> Sorry, but even in current development sources, PL/pgSQL cannot return a 
> set (or at least if it can, I can't figure out how). I'm hoping to 
> change that before 7.3 is released, but at this point I haven't even 
> looked at it too hard.
> 
> You might look at having your function return a refcursor. See:
> http://developer.postgresql.org/docs/postgres/plpgsql-cursors.html
> section 23.7.3.3. Returning Cursors. The URL is for the 7.3 development 
> docs, but I think the example shown will work in 7.2.x.
> 
> Joe
> 
> 
> 

-- 
Laurette Cisneros
The Database Group
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
Where's my....bus?



pgsql-interfaces by date:

Previous
From: Joe Conway
Date:
Subject: Re: return rows question
Next
From: Hans-Jürgen Schönig
Date:
Subject: PL/Perl untrusted ...