Take the 2-minute tour ×  I'm trying to use ogr2ogr to upload a
shapefile to a remote PostGres installation. When I ran this
command:  celenius:~ celenius$ ogr2ogr -f PostgreSQL PG:"host=
user=postgres dbname=mydb password=***" Dropbox/data/roads.shp;
I got the following error message:  Unable to find driver
`PostgreSQL'. The following drivers are available:   -> `ESRI
Shapefile'   -> `MapInfo File'   -> `UK .NTF'   -> `SVG'   ->
`CouchDB'   -> `Idrisi'   -> `ARCGEN'   -> `SEGY'  (I omitted
some of the drivers as they are not relevant). Is there a way
that I can update ogr2ogr to include PostgreSQL? I'm using a Mac
with OS 10.7.4  share|improve this question  5 Answers 5  Using
Homebrew you should:  brew install gdal --with-postgresql  or
with older versions of gdal:  brew install gdal --with-postgres
if you have already installed gdal with brew before but without
postgresql support, just  brew uninstall gdal  share|improve
this answer a small correction: brew install gdal --with-
postgresql –  BenjaminGolde