Re: set-valued function difference in 8.1.0 vs 8.0.2

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rm_pg(at)cheapcomplexdevices(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: set-valued function difference in 8.1.0 vs 8.0.2
Date: 2005-11-09 22:20:35
Message-ID: 19969.1131574835@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

rm_pg(at)cheapcomplexdevices(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-11-09 22:22:47 Re: build errors on MacOSX
Previous Message Andrus 2005-11-09 22:16:07 Re: Best way to use indexes for partial match at beginning