Re: return rows question

From: Laurette Cisneros <laurette(at)nextbus(dot)com>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: return rows question
Date: 2002-06-15 16:44:41
Message-ID: Pine.LNX.4.44.0206150944190.20721-100000@visor.corp.nextbus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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?

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Hans-Jürgen Schönig 2002-06-16 15:32:05 PL/Perl untrusted ...
Previous Message Parul Agarwal 2002-06-15 10:20:06 JDBC problem