I'm setting the URI of a PostGIS view layer in the following way:<div><br></div><div>> uri.setDataSource(schema,table,geom_column,'',key_column)</div><div><br></div><div>but the resulting layer has something wrong, eg layer.isValid() returns False, and I can't load it.</div>
<div>I can load the same view through the GUI, settings the Primary Key Column manually.</div><div>What's wrong with the way I'm using setDataSource?</div><div><br></div><div>giovanni</div><div><br></div>