4 # Create 'openstreetmap' user
5 psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" <<-EOSQL
6 CREATE USER openstreetmap SUPERUSER PASSWORD 'openstreetmap';
7 GRANT ALL PRIVILEGES ON DATABASE openstreetmap TO openstreetmap;
10 # Create btree_gist extensions
11 psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -c "CREATE EXTENSION btree_gist" openstreetmap
13 # Define custom functions
14 psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -f "/usr/local/sbin/osm-db-functions.sql" openstreetmap