"Jonah H. Harris" <jonah(dot)harris(at)gmail(dot)com> writes:
> On 8/11/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 4. Treat PORTAL_ONE_RETURNING like PORTAL_UTIL_SELECT rather than
>> like PORTAL_ONE_SELECT; that is, execute the query to completion
>> on first call and stash the results in a tuplestore until the
>> client fetches them.
> I agree that it's inefficient, but am trying to think of any other
> positive reasons for doing #4 instead. Can you think of any other
> advantages system-wide to using #4 instead of #3?
Not really. Locks and so forth held by the query would be held till
commit in any case, so I don't see much advantage in finishing the
query immediately.
regards, tom lane