Chapman Flack <chap@anastigmatix.net> writes:
> I'm having difficulty coming up with a query that actually doesn't
> run the SRF to completion.
From memory, nodeFunctionscan always populates the tuplestore immediately.
I've looked into changing that but not got it done.
If you write the function in the targetlist, ie
select srf(...) limit N;
I think it will act more like you expect.
regards, tom lane