Re: WIP patch: convert SQL-language functions to return tuplestores - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: WIP patch: convert SQL-language functions to return tuplestores
Date
Msg-id 162867790810310645x432c4144p5fcfdb3313e8f659@mail.gmail.com
Whole thread Raw
In response to Re: WIP patch: convert SQL-language functions to return tuplestores  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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
>


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: WIP patch: convert SQL-language functions to return tuplestores
Next
From: Peter Eisentraut
Date:
Subject: Distinct types