Ticket #17894: create-template-pg91.patch

File create-template-pg91.patch, 1.1 KB (added by John Paulett, 13 years ago)

PG 9.1 support

  • docs/ref/contrib/gis/create_template_postgis-debian.sh

    diff --git docs/ref/contrib/gis/create_template_postgis-debian.sh docs/ref/contrib/gis/create_template_postgis-debian.sh
    index 61bbef4..8a5a246 100755
     
    11#!/bin/bash
    22
     3PLPGSQL = 1
     4
    35# For Ubuntu 8.x and 9.x releases.
    46if [ -d "/usr/share/postgresql-8.3-postgis" ]
    57then
    else  
    2426    GEOGRAPHY=0
    2527fi
    2628
     29# For Ubuntu 11.10 (with PostGIS 1.5)
     30if [ -d "/usr/share/postgresql/9.1/contrib/postgis-1.5" ]
     31then
     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
     37fi
     38
    2739createdb -E UTF8 template_postgis && \
    2840createlang -d template_postgis plpgsql && \
     41if ((PLPGSQL)); then createlang -d template_postgis plpgsql; fi && \
    2942psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE datname='template_postgis';" && \
    3043psql -d template_postgis -f $POSTGIS_SQL_PATH/$POSTGIS_SQL && \
    3144psql -d template_postgis -f $POSTGIS_SQL_PATH/spatial_ref_sys.sql && \
Back to Top