As a bit of background, we are looking to transition away from the use of shapefiles. We've already started using Geopackages for desktop work (QGIS / ArcGIS) but often have a requirement to upload data to our PostgreSQL databases.
I'm aware that you are able to upload Geopackage content to Postgres using QGIS but wondering if there are any commandline utilities similar to shp2pgsql for uploading geopackages or tables in geopackages to Postgres? I'm assuming possibly ogr2ogr but can't find the documentation.
Best Answer
This tutorial shows how to import geopackges into postgres with ogr2ogr like:
Note importing into PostgreSQL like this will convert the case of the field names in your GeoPackage data to lowercase in the PostgreSQL table. To maintain case you would need to use the
lco
option like: