Re: Stored function debugging help

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Stored function debugging help
Дата
Msg-id CAF-3MvM51CQnZhD8UHdcZQ2MmTboH6bTspte9dDxtFcGfs0w=g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Stored function debugging help  (JavaNoobie <vivek.mv@enzentech.com>)
Список pgsql-general
On 28 November 2011 13:36, JavaNoobie <vivek.mv@enzentech.com> wrote:
> Well I'm not fond of using a temporary table either. But how would I be able
> to iterate over a set of consumers while using a join ? From my (limited) ,
> using only a join I would only be able to generate the data for a particular
> consumer , rather than all of them.

It would seem that the join that you already use inside your for-loop
would give you the results you want, precisely because of the join
that's in it. Provided you take off the limit, of course.

Perhaps you want those results DISTINCT ON (consumer_id), but a
for-loop is definitely not the way to do that. Not impossible, just
very inelegant and slow.
--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.

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

Предыдущее
От: JavaNoobie
Дата:
Сообщение: Re: Stored function debugging help
Следующее
От: Stefan Keller
Дата:
Сообщение: Any experiences with Foreign Data Wrappers (FDW) like mysql_fdw, odbc_fdw, www_fdw or odbc_fdw?