PostgreSQL 创建template_postgis模板

Create PostGIS template

su - postgres
psql postgres
postgres=# \c template1
postgres=# CREATE EXTENSION postgis;
createdb geodata -T template1

or

psql -d template_postgis -c "CREATE EXTENSION postgis;"
more ...