Re: [HACKERS] Stateful pointers in set-returning functions

2012-05-24 Thread Ian Pye
Fair enough -- thanks for the tip. On Thu, May 24, 2012 at 11:21 AM, Tom Lane wrote: > Ian Pye writes: >> I'm writing a set-returning function which places a file handle into >> PG's FuncCallContext's user_fctx space. My problem is that when the >> function is ran with a limit clause (SELECT * F

Re: [HACKERS] Stateful pointers in set-returning functions

2012-05-24 Thread Tom Lane
Ian Pye writes: > I'm writing a set-returning function which places a file handle into > PG's FuncCallContext's user_fctx space. My problem is that when the > function is ran with a limit clause (SELECT * FROM foo() LIMIT 10) the > server will stop calling the function automatically, not giving me

[HACKERS] Stateful pointers in set-returning functions

2012-05-24 Thread Ian Pye
Hi, I'm writing a set-returning function which places a file handle into PG's FuncCallContext's user_fctx space. My problem is that when the function is ran with a limit clause (SELECT * FROM foo() LIMIT 10) the server will stop calling the function automatically, not giving me a chance to close t