<div dir="ltr"><div><div><div>Hi strk,<br></div>I've just tried but it complains that <br>"ERROR:  type "raster" does not exist"<br><br></div>Thanks for helping<br><br></div>Paolo<br>--<br><div><font size="1">Paolo Importuni<br></font></div><div><font size="1">Software Analyst and Developer<br></font></div><font size="1">Modena, Italy</font><br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-11-09 11:12 GMT+01:00 Sandro Santilli <span dir="ltr"><<a href="mailto:strk@kbt.io" target="_blank">strk@kbt.io</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Nov 09, 2016 at 09:45:59AM +0100, Paolo Importuni wrote:<br>
<br>
> I am trying to migrate my postgres/postgis instance from 2.0 to 2.2.2<br>
> The new  postgis.so library is in the right place and I found the right<br>
> migration script postgis-2.0.0--2.2.2.sql.<br>
><br>
> I successfully upgraded three db instances by using the "ALTER EXTENSION<br>
> postgis UPDATE TO '2.2.2';"  command, but it failed on one instance.<br>
><br>
> As far as I see, the problem might be that the postgis extension wasn't<br>
> created using the "CREATE EXTENSION POSTGIS"  script, but maybe by some<br>
> other methods.<br>
><br>
> If I try to create the extension, it fails saying "ERROR: type "spheroid"<br>
> already exists"; if I try to upgrade it fails, saying that the extension<br>
> postgis does not exist.<br>
><br>
> If I create a new db instance, create a new extension and then upgrade it<br>
> to postgis 2.2. everything works fine.<br>
> Is a there  a way to sort it out?<br>
<br>
</span>To turn your non-extension install to an extension one, try this:<br>
<br>
  CREATE EXTENSION POSTGIS VERSION '2.0.0' FROM 'unpackaged';<br>
<br>
--strk;<br>
<br>
  ()   Free GIS & Flash consultant/developer<br>
  /\   <a href="https://strk.kbt.io/services.html" rel="noreferrer" target="_blank">https://strk.kbt.io/services.<wbr>html</a><br>
</blockquote></div><br></div>