Revision 2036
Added by Aaron Marcuse-Kubitza over 12 years ago
Makefile | ||
---|---|---|
169 | 169 |
-echo "CREATE DATABASE vegbien WITH OWNER bien TEMPLATE template0 \ |
170 | 170 |
ENCODING 'UTF8' LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8';"|$(psqlAsAdmin) |
171 | 171 |
echo $(rmPublicSchema)|$(psqlAsAdmin) vegbien |
172 |
$(createPlpgsql) |
|
172 | 173 |
# ignore errors if user or database exists |
173 | 174 |
# drop public schema *as admin* because it starts out owned by postgres |
175 |
createPlpgsql := echo 'CREATE PROCEDURAL LANGUAGE plpgsql;'\ |
|
176 |
|bin/db_dump_localize|$(psqlAsBien) |
|
174 | 177 |
|
175 | 178 |
rm_db: _always |
176 | 179 |
@$(confirmRmDb) |
... | ... | |
183 | 186 |
|
184 | 187 |
schemas/install: schemas/vegbien.sql _always |
185 | 188 |
-echo "CREATE SCHEMA public;"|$(psqlAsBien) |
186 |
<$< bin/db_dump_localize|$(psqlAsBien)
|
|
189 |
<$< $(psqlAsBien) |
|
187 | 190 |
# ignore errors if schema exists |
188 | 191 |
# public schema will be owned by bien |
189 | 192 |
|
Also available in: Unified diff
Moved "CREATE PROCEDURAL LANGUAGE plpgsql" to main Makefile so that it would only run when the DB is created, not when the public schema is reinstalled. This is only relevant on PostgreSQL < 9.x, where the plpgsql language is not part of template0.