Bug report #13448

Qgis DBManager does nothing and does not output nothing in the console for this command

Added by baditaflorin - over 8 years ago. Updated about 5 years ago.

Category:Data Provider/PostGIS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:21495


New description:

When loading a table that is a geometry collection, warn the user that the layer will now be shown on map (or make qgis do not allow load such kind of layers at all).

Old description:

If i hit the execute, it will execute and i will see the result.

But if i select Load as new Layer, select "gid" or "cancat" for the unique integer values , and st_union for geometry column, it will stay to process as if it was loading, but then nothing will happen, i don`t get a error, i don`t see nothing outputted in the error log ...

The code that i am using

select *, ST_Union(ST_centroid(the_geom),the_geom) from inegi.mgm2013v6_2
limit 5;

The database dump is here https://www.dropbox.com/s/pf27r8j5fqrcj49/qgis_bug.backup?dl=0


#1 Updated by Giuseppe Sucameli over 8 years ago

  • Status changed from Open to Feedback

The st_union column used as geometry column to load the layer has GeometryCollection type...
QGIS is not able to display GeometryCollection.

In current master it adds the layer to TOC but it doesn't display anything.

The same behaviour you get if you create a view using the query you reported and then try to load that view directly in QGIS from Add Postgis Layer.

DBManager doesn't check the geometry column type before trying to load the query.
Maybe QGIS should display a warning message when a layer contains GeometryCollection geometries.

BTW, I'm unable to do a test on QGIS v2.8.2.

#2 Updated by Giovanni Manghi over 8 years ago

  • Affected QGIS version changed from 2.8.2 to master
  • Status changed from Feedback to Open
  • Category changed from DB Manager to Data Provider/PostGIS

#3 Updated by Giovanni Manghi about 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#4 Updated by Giovanni Manghi about 5 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF