2008/10/31 Tom Lane <tgl@sss.pgh.pa.us>:
> "Pavel Stehule" <pavel.stehule@gmail.com> writes:
>> RETURN QUERY should be implemented for lazy execution model. And it
>> should be fast and not to much dificult.
>
> Really? Consider what happens if it's inside a loop, or an exception
> block, or any other nesting construct.
>
true, I forgot, RETURN QUERY shouldn't be last statement. But when we have some
RETURN FINAL QUERY, I believe so it should be possible - we only
should to call plpgsql in two modes - standard and result of final
query.
regards
Pavel Stehule
> regards, tom lane
>