Re: Terminating a SETOF function call sequence
От | Thomas Hallgren |
---|---|
Тема | Re: Terminating a SETOF function call sequence |
Дата | |
Msg-id | thhal-0KVPwApWVxicchSrHc3ZxJlQzn5JvSt@mailblocks.com обсуждение исходный текст |
Ответ на | Re: Terminating a SETOF function call sequence (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane wrote: >Thomas Hallgren <thhal@mailblocks.com> writes: > > >>My question is, what happens when the evaluator doesn't need more rows? >>Will it: >>a) call the function with call_cntr >= max_calls? >>b) continue calling until the set is exhausted anyway? >>c) simply stop calling? >> >> > >(c) > > > >>a) seems unlikely since max_calls is set by the user, b) doesn't seem >>very optimal, and c) would be very bad since it doesn't give me any >>chance to release the resources that where used in order to produce the >>rows. >> >> > >This is what RegisterExprContextCallback is for. > > regards, tom lane > > Thanks Tom, This is exactly what I need. I didn't know that such a callback existed. Perhaps it should be mentioned in the documentation chapter that talks about SETOF and C-functions? Regards, Thomas Hallgren
В списке pgsql-hackers по дате отправления: