Revision 6949
Added by Aaron Marcuse-Kubitza almost 12 years ago
bin/vegbien_dest | ||
---|---|---|
11 | 11 |
return 2 |
12 | 12 |
fi |
13 | 13 |
|
14 |
: ${prefix=out_} ${version=public} ${public=$version}
|
|
14 |
: ${prefix=} ${version=public} ${public=$version} |
|
15 | 15 |
|
16 | 16 |
export version public \ |
17 | 17 |
${prefix}engine=PostgreSQL \ |
bin/psql_script_vegbien | ||
---|---|---|
6 | 6 |
|
7 | 7 |
. "$selfDir/vegbien_dest" |
8 | 8 |
|
9 |
searchPath="\"${out_schemas//,/\",\"}\""
|
|
9 |
searchPath="\"${schemas//,/\",\"}\"" |
|
10 | 10 |
|
11 | 11 |
(test -z "$no_search_path" && echo "SET search_path TO $searchPath;"; cat)\ |
12 | 12 |
|nice -n +5 "$selfDir/psql_vegbien" --set ON_ERROR_STOP=1 --quiet "$@" |
bin/postgres_vegbien | ||
---|---|---|
4 | 4 |
selfDir="$(dirname -- "$0")" |
5 | 5 |
|
6 | 6 |
. "$selfDir/vegbien_dest" |
7 |
export PGHOST="$out_host" PGUSER="$out_user" PGPASSWORD="$out_password" \
|
|
8 |
PGDATABASE="$out_database"
|
|
7 |
export PGHOST="$host" PGUSER="$user" PGPASSWORD="$password" \
|
|
8 |
PGDATABASE="$database" |
|
9 | 9 |
|
10 | 10 |
exec "$@" |
map | ||
---|---|---|
11 | 11 |
# VegBIEN DB defaults |
12 | 12 |
prefix=in_ |
13 | 13 |
test "$in_database" = vegbien && . "$bin/vegbien_dest" |
14 |
prefix=out_ |
|
15 |
test "$out_database" = vegbien && . "$bin/vegbien_dest" |
|
14 | 16 |
unset prefix |
15 |
test "$out_database" = vegbien && . "$bin/vegbien_dest" |
|
16 | 17 |
|
17 | 18 |
# Other defaults |
18 | 19 |
if test -n "$in_engine"; then |
Also available in: Unified diff
vegbien_dest: Changed default $prefix to "", so that the majority of callers don't need to manually set $prefix to "" to avoid it defaulting to out_