1 |
4395
|
aaronmk
|
#!/bin/sh
|
2 |
|
|
# Creates analytical DB
|
3 |
|
|
|
4 |
|
|
selfDir="$(dirname -- "$0")"
|
5 |
|
|
|
6 |
6047
|
aaronmk
|
exec &>"$selfDir/../schemas/make_analytical_db.log"
|
7 |
|
|
|
8 |
6045
|
aaronmk
|
set -x
|
9 |
|
|
"$selfDir/psql_verbose_vegbien" <<EOF
|
10 |
6042
|
aaronmk
|
SELECT make_family_higher_plant_group();
|
11 |
|
|
|
12 |
|
|
TRUNCATE analytical_stem;
|
13 |
|
|
INSERT INTO analytical_stem SELECT * FROM analytical_stem_view;
|
14 |
|
|
TRUNCATE analytical_aggregate;
|
15 |
|
|
INSERT INTO analytical_aggregate SELECT * FROM analytical_aggregate_view;
|
16 |
|
|
TRUNCATE geoscrub_input;
|
17 |
|
|
INSERT INTO geoscrub_input SELECT * FROM geoscrub_input_view;
|
18 |
|
|
EOF
|