Project

General

Profile

« Previous | Next » 

Revision 10126

bugfix: *Makefile: $(asAdmin) invocations of Postgres commands: need to set DB user to postgres so that it won't default to the system user _postgres

View differences:

lib/common.Makefile
89 89
# DB
90 90
asAdmin := sudo -E -u postgres
91 91
psqlOpts := --set ON_ERROR_STOP=1 --quiet
92
psqlAsAdmin := $(asAdmin) psql $(psqlOpts)
92
psqlAsAdmin := $(asAdmin) psql -U postgres $(psqlOpts)
93 93
    # -E preserves env vars so PGOPTIONS is passed to psql
94 94
mkSchemaCmd = 'CREATE SCHEMA $(1);'
95 95
rmSchemaCmd = 'DROP SCHEMA IF EXISTS "$(1)" CASCADE;'
Makefile
262 262
	-echo "CREATE DATABASE vegbien WITH OWNER bien TEMPLATE template1 \
263 263
ENCODING 'UTF8' LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8';"|$(psqlAsAdmin)
264 264
	-echo "CREATE EXTENSION hstore SCHEMA pg_catalog;"|$(psqlAsAdminVegbien)
265
	-$(asAdmin) createlang plpython3u vegbien
265
	-$(asAdmin) createlang -U postgres plpython3u vegbien
266 266
	-cat config/users.sql|$(psqlAsAdmin)
267 267
# ignore errors if user/database/etc. exists
268 268

  

Also available in: Unified diff