Vlad Krupin <vlad(at)echospace(dot)com> writes:
> - Also, it does not seem to affect just regular SELECT queries - only
> when they are wrapped in my stored procedure that returns a refcursor.
Queries in plpgsql functions and PREPAREd queries are the only ones that
save plans, AFAIR.
> An even better way to do it is to tell all planners to discard their
> cached plans if the the index they are relying on suddenly disappears.
When we get around to implementing this, it will be automatic, not based
on the user having to do something special.
regards, tom lane