Created
July 10, 2013 19:15
-
-
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.
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
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