[Qgis-developer] Append to PostGIS table

Victor Olaya volayaf at gmail.com
Tue Aug 27 03:55:51 PDT 2013


Hi

I am trying to append a layer to a PostGIS table, but I am having
trouble. I am calling

QgsVectorLayerImport.importLayer(layer, uri.uri(), providerName,
layer.crs(), False, False, options)

with options['append'] = True, but it is not working (it complains
that the relation already exists, so I guess it is not actually
appending.

The DB manager uses this, but I haven't been able to make it work
either (the "Add to table" option it is actually never enabled...)

The PostGIS manager plugin is the only one that works for this, but it
calls shp2pgsql on the console, which is something that I would prefer
to avoid.

any ideas?

Thanks!


More information about the Qgis-developer mailing list