Robert Haas <robertmhaas@gmail.com> writes:
> Exposing it to the user is what I think is ugly.
Ok, and the current idea fixes that! :)
> It's also worth noting that ALTER EXTENSION .. SET SCHEMA does NOT
> guarantee a correct relocation, because someone might have done ALTER
> FUNCTION .. SET search_path = @extschema@, and that's not going to get
> properly fixed up. I'm coming to the conclusion more and more that
> ALTER EXTENSION .. SET SCHEMA just can't work reliably.
For starters, an extension's script that requires an @extschema@
property is to be marked non-relocatable, so the command here would just
error out. Then again, should the extension's author forgot to mark it
relocatable, the @extschema@ placeholder is not replaced in the current
proposal, so that means that the objects schema are all hard-coded in
the script.
Then, if the superuser thinks it's a good idea to break the extension
after it's been installed, I'm not sure we can do anything about it.
Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support