From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, bz(at)mailinator(dot)com, PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #13442: ISBN doesn't always roundtrip with text |
Date: | 2015-07-27 16:59:06 |
Message-ID: | alpine.DEB.2.10.1507271848230.3538@sto |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2015-07-27 17:32:42 | Re: Memory leak in XLOG reader facility when decoding records (caused by WAL refactoring) |
Previous Message | Jeff Janes | 2015-07-27 16:03:38 | Re: BUG #13442: ISBN doesn't always roundtrip with text |