ogr2ogr [-f/-of/<format_name>] ... [file_name] [PG:<Connection_Info>] [-nln/<New_Layer_Name> ...] ... [-sql] ... / <table_name>
Converting a db table to GeoPackage
General
PostgreSQL
GDAL
QGIS

Check the following web site for the DB options:

OGR2OGR PG Options

Description :

Example :
ogr2ogr -f "GPKG" error_table.gpkg PG:"host=localhost user=tester dbname=citydb-visualizer password=XXXXXX schemas=citydb port=9876" -nln error_features "mv_geometries"
2026 Feb