Hi, 

I have QGIS projects that load Postgis views that are sometimes empty,
sometimes contain data. 

I noticed that current master cannot load empty Postgis views anymore.
The error message is that "PostgreSQL layer has no primary key". Note
that I did select a primary key manually. 

Same issue if you load the view using "Add Postgis layer" or if you load
an existing project that has a reference to the empty Postgis view. I
checked the <datasource/> in the .qgs file and the primary key is
present in the datasource element. 

So, there seems to be an issue that current master cannot load empty
Postgis views. It is a regression, as this used to work in previous
versions. 

Note that the reason why my view is sometimes empty is that it contains
objects filtered by status "projected" - there can be dates when there
are no elements with such a status. 

I hope this can be fixed before we ship QGIS 2.12. 

Opened as bug issue http://hub.qgis.org/issues/13638  

Thanks, 

Andreas 
  
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to