[gdal-dev] exporting all tables from PG schema

jratike80 jukka.rahkonen at maanmittauslaitos.fi
Tue Dec 29 09:27:53 PST 2020


Hi,

I would have a try with open option LIST_ALL_TABLES=YES
https://gdal.org/drivers/vector/pg.html.
"LIST_ALL_TABLES=YES/NO: This may be “YES” to force all tables, including
non-spatial ones, to be listed." It is probably worth reading
https://gdal.org/drivers/vector/gpkg.html as well, about the layer creation
options and aspatial tables.


-Jukka Rahkonen-




ghtmtt wrote
> Hi all,
> 
> I'd like to export all the table of a PG schema to either GPKG or a 
> shapefiles.
> 
> In the schema I've a lot of non-spatial tables and with something like:
> 
> ogr2ogr -f GPKG output.gpkg "PG:dbname=mydb schemas=myschema user=myuser 
> password=mypws host=myhost" -progress
> 
> the output is generated but it only contains geometric tables. I 
> couldn't find a parameter to force the export of also non-spatial tables.
> 
> What I'd like to avoid is to loop on every single layer
> 
> Cheers and thanks
> 
> Matteo
> _______________________________________________
> gdal-dev mailing list

> gdal-dev at .osgeo

> https://lists.osgeo.org/mailman/listinfo/gdal-dev





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list