Skip to content

Instantly share code, notes, and snippets.

@marconi
Created July 10, 2013 19:15
Show Gist options
  • Save marconi/5969279 to your computer and use it in GitHub Desktop.
Save marconi/5969279 to your computer and use it in GitHub Desktop.
Creating template_postgis template for postgresql database in OSX mountain lion with components installed via homebrew.
createdb template_postgis -E UTF-8
createlang plpgsql template_postgis
psql -d template_postgis -f /usr/local/Cellar/postgis/2.0.3/share/postgis/postgis.sql
psql -d template_postgis -f /usr/local/Cellar/postgis/2.0.3/share/postgis/spatial_ref_sys.sql
psql -d postgres
UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
createdb -T template_postgis <db name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment