Re: BUG #13442: ISBN doesn't always roundtrip with text
От | Fabien COELHO |
---|---|
Тема | Re: BUG #13442: ISBN doesn't always roundtrip with text |
Дата | |
Msg-id | alpine.DEB.2.10.1507271848230.3538@sto обсуждение исходный текст |
Ответ на | Re: BUG #13442: ISBN doesn't always roundtrip with text (Jeff Janes <jeff.janes@gmail.com>) |
Список | pgsql-bugs |
Hello, >> After some tests, it seems that an upgrade script cannot be provided, >> or I missed something. >> >> Basically version 1.0 was confusing ISBN & ISBN13, and for upgrading the >> ISBN type definition must be modified. However, there is no such thing as >> ALTER TYPE, and trying DROP TYPE/ALTER TYPE is rejected because the type >> belongs to an extension (hey I know that, this is what is being done!). > > You can't test extension upgrade scripts by running the component > statements at the command line. You have to make an actual dummy upgrade > script and test it via "alter extension ... update ...". Yep... but I actually tried that. > When executed in that context, they are exempted from the rule you are > running into. With DROP TYPE isbn: # ALTER EXTENSION isn UPDATE; ERROR: cannot drop type isbn because other objects depend on it DETAIL: extension isn depends on type isbn HINT: Use DROP ... CASCADE to drop the dependent objects too. With DROP TYPE isbn CASCADE: # ALTER EXTENSION isn UPDATE; ERROR: cannot drop extension "isn" because it is being modified > (Or maybe there is another way that I don't know of). > But I wonder what will happen when you try to drop a type which is in use? Probably it should drop the dependent objects recursively, but as isn depends on isbn we do not want to drop the extension while upgrading it. -- Fabien.
В списке pgsql-bugs по дате отправления: