[Qgis-developer] Problem with empty Postgis views

Neumann, Andreas a.neumann at carto.net
Tue Oct 20 02:06:41 PDT 2015


 

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 
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20151020/c42af44a/attachment-0001.html>


More information about the Qgis-developer mailing list