Bug report #9421

Cannot edit PostGIS tables with SRID=0 (multipolygon considered polygon)

Added by Sandro Santilli about 10 years ago. Updated about 10 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Data Provider/PostGIS
Affected QGIS version:2.0.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:18016

Description

Multipolygon PostGIS tables with unknown srid (0) appear twice in the "Add PostGIS Layer" dialog, once with a SRID prompt and correct "multipolygon" type, and once with SRID=0 and bogus "polygon" type. Adding the "polygon" type makes it impossible to edit the layer, because on "save" qgis tries to insert "polygon", rather than "multipolygon".

It would be nice to get this fixed in a 2.0.2...

Associated revisions

Revision eaf5725f
Added by Jürgen Fischer about 10 years ago

postgres provider: don't try to detect geometry type or srid, if it's already known (fixes #9421)

History

#1 Updated by Sandro Santilli about 10 years ago

Note that this is a regression. Version 1.8.0 works fine, showing a single entry with the correct SRID (0) and the correct type (multipolygon)

#2 Updated by Jürgen Fischer about 10 years ago

  • Status changed from Open to Closed

#3 Updated by Sandro Santilli about 10 years ago

Could this be backported to 2.0 branch too ?

#4 Updated by Mathieu Pellerin - nIRV about 10 years ago

Sandro, considering QGIS 2.2 is (planned) to be released in less than a month, might simply be better to update to the greatest and latest :)

#5 Updated by Sandro Santilli about 10 years ago

greatest, latest, and most regressing one ... (assumption, not verified, but made with high experience of the matter)

Also available in: Atom PDF