On Mon, 7 Aug 2000, Tom Lane wrote:
> Jan Wieck <janwieck@Yahoo.com> writes:
> > PL/Tcl and PL/pgSQL will load a function's source only once a
> > session. The functions loaded are identified by OID, so if
> > you drop/create a function, the PL handler will simply load a
> > different function too (from his point of view). At the time
> > we are able to ALTER a function, we might want to include
> > some version counter to pg_proc and in the fmgr_info?
>
> More generally, the PL functions need to be able to deal with
> recomputing saved plans after an ALTER of a table referenced by the
> function. I haven't really thought about how to do that ... but it
More and more generally, IMHO all saved plans need some validity checking and not only for ALTER, but also for all
operationthosechanging relevant system tables. And this is not problem for PL only,but for all what is based on SPI
(andVIEWs?).
IMHO correct solution is _one_ space and one method for plans saving= query/plan cache, and some common
validity-checkerthat will workover this cache. But how implement validity-checker is unknown...(? Call from all command
thatchanging system tables some handler, that check plans in a cache ?)
Karel
BTW. - first step in this problem is (or can be) on the way --- query cache...