QGIS didn't load empty tables with geometry columns from Postgresql, showing this error message: "invalid PostgreSQL layer", but when these tables have data it shows it without any problem.

Is it possible to load an empty PostGIS table on QGIS as layers?

The image below shows the same tables in different databases one is with data which is "gui_tool" and the other "test_tool" has no data.

enter image description here

  • I believe it would not be easy because QGIS wants to know some general information about the data source when it opens data. For example the geographic extent of data is NULL if there is no data and it can be hard for QGIS to accept that. – user30184 Jan 12 at 16:39
  • If there is no geometry, but there is a column of geometry/geog type I have found that they won't display. If you add a feature to one of them (only a value in the geom column), do they show up? – DPSSpatial Jan 12 at 16:44
  • 1
    Might need a valid bounding box – Ian Turton Jan 12 at 16:47
  • @DPSSpatial if data available in geom, QGIS will show them. – Alloylo Jan 12 at 16:51
  • @Alloylo I think that's the problem... – DPSSpatial Jan 12 at 17:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.