Mercurial > dive4elements > river
comparison backend/doc/schema/postgresql-setup.sh @ 7352:c6825778de1f
Merged double-precision branch.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 16 Oct 2013 13:03:13 +0200 (2013-10-16) |
parents | 4ad2b530dbba |
children | c1cea6c95967 |
comparison
equal
deleted
inserted
replaced
7350:760ea7f08455 | 7352:c6825778de1f |
---|---|
9 | 9 |
10 # create PostGIS-DB | 10 # create PostGIS-DB |
11 createuser -S -D -R $1 | 11 createuser -S -D -R $1 |
12 createdb $1 | 12 createdb $1 |
13 createlang plpgsql $1 | 13 createlang plpgsql $1 |
14 # Appears e.g. as /usr/share/postgresql/contrib/postgis-1.5/ on other systems. | 14 # Path appears e.g. as /usr/share/postgresql/contrib/postgis-1.5/ on some systems, |
15 psql -d $1 -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql | 15 # /usr/share/postgresql/8.4/contrib/postgis-1.5/ on others |
16 psql -d $1 -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql | 16 POST_INIT_DIR=`find /usr/share/postgresql/ -name spatial_ref_sys.sql | sed -n '1p'` |
17 POST_INIT_DIR=`dirname $POST_INIT_DIR` | |
18 psql -d $1 -f $POST_INIT_DIR/postgis.sql | |
19 psql -d $1 -f $POST_INIT_DIR/spatial_ref_sys.sql | |
17 psql -d $1 -c "ALTER USER $1 WITH PASSWORD '$1';" | 20 psql -d $1 -c "ALTER USER $1 WITH PASSWORD '$1';" |
18 psql -d $1 -c "GRANT ALL ON geometry_columns TO $1; GRANT ALL ON geography_columns TO $1; GRANT ALL ON spatial_ref_sys TO $1;" | 21 psql -d $1 -c "GRANT ALL ON geometry_columns TO $1; GRANT ALL ON geography_columns TO $1; GRANT ALL ON spatial_ref_sys TO $1;" |
19 | 22 |
20 # add credentials to .pgpass (or create .pgpass) | 23 # add credentials to .pgpass (or create .pgpass) |
21 echo "*:*:$1:$1:$1" >> ~/.pgpass | 24 echo "*:*:$1:$1:$1" >> ~/.pgpass |