I seem this patch is enough, but could you explain the reason you drop initial proposal more detail? I'm not sure why extensions contained by temporary schemas are acceptable.
Here's my objection.
Everything a relocatable extension can create can be created normally in a temporary schema currently. This includes types, functions, etc.
So I can create a type in a temporary schema and then create a table in a public schema using that type as a column. This behaves oddly (when I log out of my session the column gets implicitly dropped) but it works consistently. Adding special cases to extensions strikes me as adding more funny corners to the behavior of the db in this regard.
Now there are times I could imagine using temporary schemas with extensions. This could include testing multiple versions of an extension so that multiple concurrent test runs don't see each other's versions. This could be done with normal schemas but the guarantees are not as strong regarding cleanup.
> Anything depending on a temporary object will be dropped per > dependency links once the session is over.
Extensions locate at pg_temp_* schemas are temporary objects IMO. How do you think? Would you implement this functionality in future?
That's the way things are now as far as I understand it, or do I misunderstand your question?