[postgis-users] problems while upgrading postgis

Paolo Importuni imppao at gmail.com
Wed Nov 9 12:18:06 PST 2016


Sorry strk, it worked!  I was doing something wrong.

So resume for anyone interested:
I was trying to migrate from postgis 2.0 to 2.2
I successfully installed the postgis static library and had the migration
script in place.
The soft upgrade works "ALTER EXTENSION postgis UPDATE TO '2.2.2';" works
only if the db instance was spatially enabled by running the script "CREATE
EXTENSION POSTGIS"
In case it wasn´t and as strk suggested, run the following steps:

CREATE EXTENSION POSTGIS VERSION '2.0.0' FROM 'unpackaged';
sudo -u postgres psql -d <yrdb> -f  rtpostgis.sql (in
/usr/share/postgresql/9.1/contrib/postig-2.0/  on my instance)


Thank you very much for your support!
Paolo

2016-11-09 20:27 GMT+01:00 Sandro Santilli <strk at kbt.io>:

> On Wed, Nov 09, 2016 at 06:33:28PM +0100, Paolo Importuni wrote:
> > 2016-11-09 12:06 GMT+01:00 Sandro Santilli <strk at kbt.io>:
> > > On Wed, Nov 09, 2016 at 11:44:53AM +0100, Paolo Importuni wrote:
> > > >
> > > > I've just tried but it complains that
> > > > "ERROR:  type "raster" does not exist"
> > >
> > > This is because postgis _EXTENSION_ is forced to have
> > > also raster in it :(
> > >
> > > So the fix is for you to load raster script for 2.0.0
> > >
> > > psql -f `pg_config --sharedir`/contrib/postgis-2.0/rtpostgis.sql
> <yourdb>
> >
> > still problems, it says:
> > "You need to install postgresql-server-dev-X.Y for building a server-side
> > extension or libpq-dev for building a client-side application"
>
> Not the psql command I gave you above, right ?
> Did you try that ? Or what are you doing ?
>
> > Do I need to apt-install postgresql-server-dev-X.Y? What's the use?
>
> If you're building PostGIS yourself  you need postgresql server headers.
>
> --strk;
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20161109/62a80099/attachment.html>


More information about the postgis-users mailing list