[postgis-users] Problems after update to PostGis 2.0

Sandro Santilli strk at keybit.net
Wed Apr 25 03:10:16 PDT 2012

On Wed, Apr 25, 2012 at 09:23:50AM +0200, Felix Obermaier wrote:
> Hello list,
> I'm having problems with my spatial tables after I "soft" updated from postgis 1.5.3 to postgis 2.0.
> Every query I execute that involves a geometry column throws 
> Invalid geometry type: <some large negative number>.
> Do you have any idea why this is happening,

Yes, the internal representation of geometries changed between 1.5.3 and 2.0
so "soft" upgrade isn't an option. How did you "soft" upgrade ? Did you use
the postgis_upgrade_xxy scripts ? I tought we safe-guarded from such
cross-major-version use within those scripts.

> is there a way to fix it?

Do you have a dump (in postgresql custom format) of your database ?
In that case you can use an hard-upgrade procedure (proper, as described
in the manual).

Otherwise you can try loading the posgis.sql which comes with 1.5
and cross your fingers (maybe removing the BEGIN/END lines wrapping it
all within a transaction).

But whatever you do focus on backups first.


  |   __/  |    Delivering high quality PostGIS 2.0 !
  |  / 2.0 |    http://strk.keybit.net - http://vizzuality.com

More information about the postgis-users mailing list