I am looking for an "elegant" solution to write, from a python script, a layer from qgis and into a new table of a PostGIS database. I thougth that this might be solved by QgsWriteVectorLayer, but I could not find any hint that this is supported. I only found the solution that this can be done e.g. with Qtsql, but then one has to:
أكثر...
- analyse the layer (field names, field datatypes, srid, ... )
- create the table and
- fill the table with date.
أكثر...