Hi guys,<br><br>I've some table with geometry in a postgreSQL db <br>and I want to show a preview of them.<br><br>I've used QgsDataSourceURI and QgsVectorLayer, <br>but I would get from db a limited number of rows.<br>
<br>So I tried this (in python):<br><br>uri = qgis.core.QgsDataSourceURI()<br>uri.setConnection(host, port, dbname, user, passwd)<br>uri.setDataSource(schema, table, geom_column)<br>uri.setSql('LIMIT 10')<br><br>but it doesn't work fine because the sql can be <br>
only a condition.<br><br>Anyone can help me? Do you have any idea about this?<br><br>Cheers<br><br>-- <br>Giuseppe Sucameli<br>