Hi guys,<br><br>I&#39;ve some table with geometry in a postgreSQL db <br>and I want to show a preview of them.<br><br>I&#39;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(&#39;LIMIT 10&#39;)<br><br>but it doesn&#39;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>