<html><body>
<p>Hi all,<br>
<br>
I have a PostGIS layer with multiple geometries: POINT, MULTIPOINT, LINESTRING and MULTILINESTRING.<br>
<br>
I tried to add a layer in this way:<br>
<br>
uri = QgsDataSourceURI()<br>
uri.setConnection ("cartografia", "5432", "schema", "postgres", "pppp")<br>
uri.setSql ("sql=GeometryType('wkb_geometry') IN ('LINESTRING','MULTILINESTRING')") <br>
self.iface.addVectorLayer (uri.uri(), tab, "postgres")<br>
<br>
but QGIS complains that it cannot add GEOMETRY types. How can threat this layer as LINESTRING ?<br>
<br>
</body></html>