Created
November 6, 2014 20:17
-
-
Save rmamba/08c677c09fdcd36cc6bd to your computer and use it in GitHub Desktop.
Generate empty PostGres DB for OSM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET pgpass=secret | |
SET pguser=postgres | |
DROPDB -U postgres -h localhost planetosm | |
CREATEDB -U postgres -h localhost -T template_postgis -e -O postgres planetosm | |
psql -h localhost -t -d planetosm -U postgres -a -c "CREATE SCHEMA markware;" | |
psql -h localhost -t -d planetosm -U postgres -a -c "ALTER DATABASE planetosm SET search_path='markware','public';" | |
psql -h localhost -t -d planetosm -U postgres -a -c "GRANT ALL PRIVILEGES ON DATABASE planetosm to osm;" | |
psql -h localhost -t -d planetosm -U postgres -a -c "CREATE EXTENSION hstore;" | |
psql -h localhost -U postgres -f /home/osm900913.sql planetosm | |
VACUUMDB -h localhost -U postgres -d planetosm -z -e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment