"Abraham, Danny" <danny_abraham(at)bmc(dot)com> writes:
> Has anybody faced a problem with reusing a ref cursor?
Your fragment looks like it ought to work, but it's hard to say
where the problem is without seeing a complete example.
> PG Version 9.5.5 on Linux.
9.5.x is EOL, and the last release in that series was 9.5.25,
so you *really* oughta think about an update.
regards, tom lane