Project

General

Profile

« Previous | Next » 

Revision 6188

root Makefile: VegBIEN DB: DB and bien user: mk_db: Updated for PostgreSQL 9.1.6, which requires the DB name to be specified on the command line instead of in the $PGDATABASE env var set by postgres_vegbien. Fixed bug where need to run createlang as postgres superuser, because plpythonu is an untrusted language (with unrestricted access to the entire DB).

View differences:

Makefile
172 172
postgres-: _always ; # other OSes
173 173

  
174 174
psqlOpts := --set ON_ERROR_STOP=1 --quiet
175
asAdmin := sudo -E -u postgres
175 176
psqlAsAdmin := sudo -E -u postgres psql $(psqlOpts)
176 177
    # -E preserves env vars so PGOPTIONS is passed to psql
177 178
psqlAsAdminVegbien := $(psqlAsAdmin) vegbien
......
196 197
	-echo "CREATE USER bien PASSWORD '$(bienPassword)';"|$(psqlAsAdmin)
197 198
	-echo "CREATE DATABASE vegbien WITH OWNER bien TEMPLATE template1 \
198 199
ENCODING 'UTF8' LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8';"|$(psqlAsAdmin)
199
	-bin/postgres_vegbien createlang plpythonu
200
	-$(asAdmin) createlang plpythonu vegbien
200 201
# ignore errors if user/database/etc. exists
201 202

  
202 203
rm_initial_public: _always

Also available in: Unified diff