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
seems like Stephan's idea of a table showing referencers and referencees
might help detect the cases where plans have to be flushed.

			regards, tom lane

Mon, 07 Aug 2000 16:23:36 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: Constraint stuff 

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 operation those
 changing relevant system tables. And this is not problem for PL only,
 but for all what is based on SPI (and VIEWs?).

 IMHO correct solution is _one_ space and one method for plans saving
 = query/plan cache, and some common validity-checker that will work
 over this cache. But how implement validity-checker is unknown...
 (? Call from all command that changing 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...


Tue, 8 Aug 2000 10:26:06 +0200 (CEST)
Karel Zak <zakkr@zf.jcu.cz>
Re: Constraint stuff 