<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'>
<p>Hi,</p>
<p>I have QGIS projects that load Postgis views that are sometimes empty, sometimes contain data.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>I hope this can be fixed before we ship QGIS 2.12.</p>
<p>Opened as bug issue <a href="http://hub.qgis.org/issues/13638">http://hub.qgis.org/issues/13638</a> </p>
<p>Thanks,</p>
<p>Andreas</p>
<div> </div>
</body></html>