Skip to content

Instantly share code, notes, and snippets.

@kathgironpe
Forked from peymano/gist:2047968
Last active February 9, 2017 02:33
Show Gist options
  • Save kathgironpe/c0861d419cc16225177ac5446c400725 to your computer and use it in GitHub Desktop.
Save kathgironpe/c0861d419cc16225177ac5446c400725 to your computer and use it in GitHub Desktop.
Restore from a binary Postgres dump file
pg_restore --clean --no-acl --no-owner -d <database> -U <user> <filename.dump>
-- Enable PostGIS (includes raster)
CREATE EXTENSION postgis;
-- Enable Topology
CREATE EXTENSION postgis_topology;
-- Enable PostGIS Advanced 3D
-- and other geoprocessing algorithms
-- sfcgal not available with all distributions
CREATE EXTENSION postgis_sfcgal;
-- fuzzy matching needed for Tiger
CREATE EXTENSION fuzzystrmatch;
-- rule based standardizer
CREATE EXTENSION address_standardizer;
-- example rule data set
CREATE EXTENSION address_standardizer_data_us;
-- Enable US Tiger Geocoder
CREATE EXTENSION postgis_tiger_geocoder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment