Hi,

I can't add non geometry tables from postgres with pyqgis, this is my code

    uri = QgsDataSourceURI()
    uri.setConnection(bd_host, bd_port, bd_db, bd_user, bd_pass)
    uri.setDataSource('public', 'persones', '', '', 'id')
    taula = QgsVectorLayer(uri.uri(), 'persones', 'postgres')
    print taula.isValid()


What is the problem?


Thanks
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to