If you migrate from Postgis 1.5.x to Postgis 2.0.x you have to do a hard upgrade. You have to dump the database before the upgrade and read it in again after the upgrade.

See http://postgis.refractions.net/documentation/manual-svn/postgis_installation.html#hard_upgrade

As this is a Postgis related problem - please ask at the Postgis mailinglist.

Andreas

PS: it is a good idea to dump your database every day for backup purposes. I use a cronjob for that. It is absolutely necessary to dump the database before you do a Postgis or library upgrade. Otherwise your data is really at risk.

On Wed, 17 Aug 2011 14:55:35 +0200, Andreas Forø Tollefsen wrote:
Thats it i guess. On the server i created a new database based on the
new postgis 2.0 trunk. The previous was an earlier trunk. At the same
time i upgraded some of the libraries i think.
Any idea on how to solve this except recreating the whole database?
I am not sure how a recovery from backup will work now.

The new database based on the latest postgis 2.0 trunk works without
problems. Strange...

 Thanks,

Andreas

2011/8/17 Andreas Neumann

yes, seems like a more serious problem in Postgis.

Perhaps consult the Postgis mailinglist about it?

Did you recently run an upgrade on this database? Or other changes
of the underlying libraries, such as geos?

Andreas

On Wed, 17 Aug 2011 14:35:49 +0200, Andreas Forø Tollefsen wrote:

Hi Andreas,

I tried using pgAdmin to access a file.
i.e. 
query: SELECT * FROM priogrid;

ERROR:  Unknown geometry type: 0 - Unknown

********** Error **********

ERROR: Unknown geometry type: 0 - Unknown
SQL state: XX000

I also tried to do this on the computer running the server. From
terminal.
psql priogrid 
and then
SELECT * FROM priogrid;

Same error: ERROR: Unknown geometry type: 0 - Unknown.

Maybe i have corrupted my whole database. I can access all the
table
columns except for the geometrical ones.

Any ideas?

2011/8/17 Andreas Neumann

Hi,

Did you double check that the permissions are ok and that all
the
Postgis connection parameters are ok (or perhaps different from
version 1.6)?

Can you access the Postgis tables with pgAdmin3 from the same
machine using the same credentials?

It could be a number of issues - permissions or wrong
connection
settings are quite likely.

Andreas

On Wed, 17 Aug 2011 13:54:58 +0200, Andreas Forø Tollefsen
wrote:

Hi all.

I recently upgraded my QGIS to 1.7. Previously using QGIS
1.6. 
Now i cant load postgis layers from the same server as i used
previously.
The problem occurs when i select a layer in the postgis
connection and
try to add this.

For instance when trying to add the cshapes dataset i get
this
error:

Unable to access the "public"."cshapes" relation.

The error message from the database was:

ERROR: Unknown geometry type: 65536 - Unknown

.

SQL: select * from "public"."cshapes" limit 1

Then i get a 'Invalid Layer' box which tells me that the
cshapes
layer
is invalid and cannot be added to QGIS.

 This happens with all of the 400 tables i have stored on my
PostGIS
server.

 Any ideas why this happens?

 Thanks in advance.

Andreas

--
--
Andreas Neumann
Böschacherstrasse 10A
8624 Grüt (Gossau ZH)
Switzerland

Links:
------
[1] mailto:a.neum...@carto.net [1]

--
--
Andreas Neumann
Böschacherstrasse 10A
8624 Grüt (Gossau ZH)
Switzerland



Links:
------
[1] mailto:a.neum...@carto.net
[2] mailto:a.neum...@carto.net

--
--
Andreas Neumann
Böschacherstrasse 10A
8624 Grüt (Gossau ZH)
Switzerland
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to