Re: set-valued function difference in 8.1.0 vs 8.0.2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: set-valued function difference in 8.1.0 vs 8.0.2
Дата
Msg-id 19969.1131574835@sss.pgh.pa.us
обсуждение исходный текст
Ответ на set-valued function difference in 8.1.0 vs 8.0.2  (rm_pg@cheapcomplexdevices.com)
Список pgsql-general
rm_pg@cheapcomplexdevices.com writes:
> I just wanted to make sure this change in behavior is
> a feature and not a bug.

Afraid so --- the plperl SRF support was rewritten in 8.1, and
it probably behaves just like plpgsql now, which has also got
this restriction.

> Is there an easy way of rewriting this construct where the results of
> a function can expand the result set that works nicely in 8.1?

A kluge some people have used with plpgsql is to put a SQL-language
wrapper function around the PL function, ie

    create function foo(...) returns ... as
      'select * from pl_foo(...)'
      language sql;

Should work for plperl too.

            regards, tom lane

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

Предыдущее
От: "Andrus"
Дата:
Сообщение: Re: Best way to use indexes for partial match at beginning
Следующее
От: Tom Lane
Дата:
Сообщение: Re: build errors on MacOSX