> If I understand this correctly, you need to ALTER EXTENSION .. DROP
> (which removes the type from the extension), then drop the type, create
> it fresh, then ALTER EXTENSION ADD to put it back.
After some testing with that, I have a conundrum: I would like the update
to *fail* if the user actually uses the isbn type so as not to harm data.
However, when the script is at:
DROP TYPE isbn;
It fails, because the isbn_in & out functions depends on it.
If you try:
DROP FUNCTION isbn_in(cstring);
It fails, because the isbn type depends on it. Sure.
The usual exit strategy is:
DROP TYPE isbn CASCADE;
Which works fine... but as a side effect silently remove ISBN columns that
may exist in user table. I do not think it is a good idea for an extension
update script to do that to a librarian:-)
Bar any idea around this issue, I think that an extension upgrade script
is really unadvisable, and the user should do a dump data, drop extension,
create extension, restore data.
--
Fabien.