diff --git a/doc/postgis.xml b/doc/postgis.xml index 0e73e455fde..feeff0ce413 100644 --- a/doc/postgis.xml +++ b/doc/postgis.xml @@ -361,6 +361,19 @@ + + Creating PostGIS spatially-enabled databases from an in-built template + Some packaged distributions of PostGIS (in particular the Win32 installers for PostGIS >= 1.1.5) load the PostGIS functions into a template database called template_postgis. If the template_postgis database exists in your PostgreSQL installation then it is possible for users and/or applications to create spatially-enabled databases using a single command. Note that in both cases, the database user must have been granted the privilege to create new databases. + + From the shell: + + # createdb -T template_postgis my_spatial_db + + From SQL: + + postgres=# CREATE DATABASE my_spatial_db TEMPLATE=template_postgis + + Upgrading