Re: return rows question

Поиск
Список
Период
Сортировка
От Laurette Cisneros
Тема Re: return rows question
Дата
Msg-id Pine.LNX.4.44.0206150944190.20721-100000@visor.corp.nextbus.com
обсуждение исходный текст
Ответ на Re: return rows question  (Joe Conway <mail@joeconway.com>)
Список 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 по дате отправления:

Предыдущее
От: Joe Conway
Дата:
Сообщение: Re: return rows question
Следующее
От: Hans-Jürgen Schönig
Дата:
Сообщение: PL/Perl untrusted ...