On Tue, Oct 18, 2016 at 11:00:54AM +0200, Mark Johnson wrote: > Inside QgsOgrProvider all of this is done as needed, but when using the > OGR-API directly each step must be done manually.
This is done in multi-step already, is it not ? https://github.com/qgis/QGIS/blob/dc5abfed892c0e8d8eac0e016dc5ee37e7725632/python/plugins/processing/tools/vector.py#L573-L579 The problem, as Germán found out, is that the URI passed as parameter is not necessarely an OGR provider URI, but a generic QGIS uri, from any provider, so it cannot always be opened via ogr.Open. In ogrConnectionString there seem to be an attempt to fetch the actual layer from the uri, but doesn't seem to work always. I've pushed a further tweak to the ogrLayerName function so to have it properly documented AND correctly handle PostgreSQL provider URIs --strk; _______________________________________________ Qgis-developer mailing list [email protected] List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
