Run brew install gdal --with-postgresql
to install the ogr2ogr
utility.
Then run the following command to create a shapefile from the table:
ogr2ogr -f "ESRI Shapefile" myshape.shp PG:"<db url>" "my_db_table"
Finally, you’ll need to zip the myshape.*
files together.