Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com> writes:
> The only question I have at the moment, before I try implementing this,
> is the the need for freeing the plan. When would that be needed?
There's probably no strong need to do it at all, unless you are dropping
your last reference to the plan.
regards, tom lane