Hi all,

I've a geopackage with many layers (in the following example let's pretend just 2) that I want to import in a single transaction (important!) into a PG database.

GPKG and PG table names are the same, but it can happen that the tables are in different schemas. I couldn't find the correct flags combination to specify the destination schema.table_name.

With the following command features of first_table are appended to the
second_table table:

ogr2ogr --debug ON -f PostgreSQL "PG:host=localhost user=matteo password=my_pws dbname=test" -append /home/matteo/export_db.gpkg first_schema.first_layer second_schema.second_layer

same with the -nln option:

ogr2ogr --debug ON -f PostgreSQL "PG:host=localhost user=matteo password=my_pws dbname=test" -append /home/matteo/export_db.gpkg first_layer -nln first_schema.first_layer second_layer -nln second_schema.second_layer

Should I specify a vrt catalog or am I missing some options?

Cheers and thanks!

Matteo

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to