Revision 12543
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/Makefile | ||
---|---|---|
48 | 48 |
confirmRmPublicSchema = $(if $(schema_exists),$(call\ |
49 | 49 |
confirm,WARNING: This will delete the $(1) schema of your VegBIEN DB!,$(2))) |
50 | 50 |
|
51 |
*q = $(if $(filter public,$*),,") |
|
52 |
|
|
51 | 53 |
# Installs a version of the public schema |
52 | 54 |
# usage: make schemas/public/reinstall |
53 | 55 |
# make schemas/r#/reinstall |
... | ... | |
58 | 60 |
# one for the most recently-created public schema. this allows validations |
59 | 61 |
# to continue to be run against a previous version of the DB while a new |
60 | 62 |
# version is being imported. |
61 |
<$< $(sed) -e 's/( )public(_[[:alnum:]_]+)?([,;]| [^[:lower:]])/\1"$*\2"\3/g'\ |
|
63 |
<$< $(sed) -e \ |
|
64 |
"s/( )public(_[[:alnum:]_]+)?([,;]| [^[:lower:]])/\1$(*q)$*\2$(*q)\3/g"\ |
|
62 | 65 |
|$(psqlNoSearchPath) # [[:alnum:]_]+, not ...*, because public_ is a username |
63 | 66 |
|
64 | 67 |
%/uninstall: vegbien.sql _always |
Also available in: Unified diff
bugfix: schemas/Makefile: `%/install: vegbien.sql`: don't enclose public_validations in "" because this causes a comment that says to search for `SET search_path = public_validations, pg_catalog;` to become mangled