One idea would be to record if the function uses non-temp tables, temp tables, or both, and invalidate based on the type of table being invalidated, rather than the table name itself. I can imagine this hurting temp table caching, but at least functions using regular tables would not be affected, and functions using temp tables would work reliably.
It seems to me it's not _that_ difficult to invalidate plans at a more granular level (based on the individual database objects they depend upon). Inlined functions need to be handled, but that is doable -- it just needs some work. The efficiency win of not needlessly throwing away cached plans is worth investing some effort, I think.
-Neil
---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]