[Qgis-user] Change postgis layer datasource

Pablo Carreira pablotcarreira at hotmail.com
Wed Feb 16 10:01:26 PST 2011


Hi, 
I'm trying to change the datasource of a postgis layer created with RT SQL, I mean, I want to make changes in the query after the layer is created. 
I tried this:
l=qgis.utils.iface.activeLayer()
d=l.dataProvider()d.setDataSourceUri(u'dbname=\'postgis\' host.......')  l.reload()
It's ok, but nothing happens.Am I in the right path? What am I missing?

Pablo Torres Carreira


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20110216/317bd1bb/attachment.html>


More information about the Qgis-user mailing list