diff --git docs/ref/contrib/gis/create_template_postgis-debian.sh docs/ref/contrib/gis/create_template_postgis-debian.sh
index 61bbef4..8a5a246 100755
|
|
|
1 | 1 | #!/bin/bash |
2 | 2 | |
| 3 | PLPGSQL = 1 |
| 4 | |
3 | 5 | # For Ubuntu 8.x and 9.x releases. |
4 | 6 | if [ -d "/usr/share/postgresql-8.3-postgis" ] |
5 | 7 | then |
… |
… |
else
|
24 | 26 | GEOGRAPHY=0 |
25 | 27 | fi |
26 | 28 | |
| 29 | # For Ubuntu 11.10 (with PostGIS 1.5) |
| 30 | if [ -d "/usr/share/postgresql/9.1/contrib/postgis-1.5" ] |
| 31 | then |
| 32 | POSTGIS_SQL_PATH=/usr/share/postgresql/9.1/contrib/postgis-1.5 |
| 33 | POSTGIS_SQL=postgis.sql |
| 34 | GEOGRAPHY=1 |
| 35 | # plpgsql installed by default in 11.10 |
| 36 | PLPGSQL=0 |
| 37 | fi |
| 38 | |
27 | 39 | createdb -E UTF8 template_postgis && \ |
28 | 40 | createlang -d template_postgis plpgsql && \ |
| 41 | if ((PLPGSQL)); then createlang -d template_postgis plpgsql; fi && \ |
29 | 42 | psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';" && \ |
30 | 43 | psql -d template_postgis -f $POSTGIS_SQL_PATH/$POSTGIS_SQL && \ |
31 | 44 | psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql && \ |