Use Python3 extension in template

remotes/origin/py3pg12postgis3
Stefan Verhoeven 5 years ago
parent 600ac3093a
commit ff22cb2a22

@ -2,17 +2,15 @@
# #
# Init script for template postgis # Init script for template postgis
# #
set -e
POSTGIS_SQL_PATH=`pg_config --sharedir`/contrib/postgis-2.2;
createdb -E UTF8 template_postgis; createdb -E UTF8 template_postgis;
createlang -d template_postgis plpgsql;
psql -d postgres -c "UPDATE pg_database SET datistemplate='true' \ psql -d postgres -c "UPDATE pg_database SET datistemplate='true' \
WHERE datname='template_postgis'" WHERE datname='template_postgis'"
psql -d template_postgis -c "CREATE EXTENSION postgis;" psql -d template_postgis -c "CREATE EXTENSION postgis;"
psql -d template_postgis -c "CREATE EXTENSION postgis_topology;" psql -d template_postgis -c "CREATE EXTENSION postgis_topology;"
psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;" psql -d template_postgis -c "GRANT ALL ON geometry_columns TO PUBLIC;"
psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;" psql -d template_postgis -c "GRANT ALL ON spatial_ref_sys TO PUBLIC;"
psql -c "CREATE EXTENSION plpythonu;" psql -d template_postgis -c "CREATE EXTENSION plpython3u;"
psql -d template_postgis -c "CREATE EXTENSION plpythonu;"
psql -d template_postgis -c "CREATE EXTENSION crankshaft VERSION 'dev';" psql -d template_postgis -c "CREATE EXTENSION crankshaft VERSION 'dev';"
psql -d template_postgis -c "CREATE EXTENSION plproxy;" psql -d template_postgis -c "CREATE EXTENSION plproxy;"

Loading…
Cancel
Save