Re: cursors as table sources

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: cursors as table sources
Дата
Msg-id 20060111191320.GU3902@pervasive.com
обсуждение исходный текст
Ответ на Re: cursors as table sources  (Will Glynn <wglynn@freedomhealthcare.org>)
Список pgsql-general
On Wed, Jan 11, 2006 at 01:41:31PM -0500, Will Glynn wrote:
> Michael Fuhr wrote:
>
> >...
> >
> >Is there a reason you'd want to use a cursor instead of, say, a view?
> >
> >Are you just curious or is there a problem you're trying to solve?
> >If I've misunderstood what you're asking then please elaborate.
> >
>
> I have previously thought this to be the most straightforward way to
> solve certain problems, including functions that amount to
> parameter-dependent views. If I want to join them against something not
> anticipated in the first function, I have to either a) write another
> function, copying the code in question, and adding the JOIN I want, or
> b) write another function, call the first function, and execute an
> astronomical number of little queries myself. Both bad options. Why
> can't I SELECT FROM cursor JOIN some_table?

I'm not quite following what you're trying to do here, but there may be
a more practical way if you want to post a concrete example. Or maybe
Tom's reply does what you need...
--
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: cursors as table sources
Следующее
От: "Jim Nasby"
Дата:
Сообщение: Re: [SPAM] - how can we use outer join in Postures - Found word(s) if you received this in error in the Text body