Jeff Rogers <jrogers(at)findlaw(dot)com> writes:
> I expect this latter to return all the ids, but it seems to only return every
> other one.
Hmm, this looks like a bug having to do with not resetting state
correctly for the next invocation of the SRF. Hard to tell whether
the bug is in your code or the system's support for SRFs though.
Joe, did you see
http://archives.postgresql.org/pgsql-general/2003-12/msg00709.php
? I don't have time to look at this right now ...
regards, tom lane