1
|
#!/bin/sh
|
2
|
# Creates analytical DB
|
3
|
|
4
|
selfDir="$(dirname -- "$0")"
|
5
|
|
6
|
psql ()
|
7
|
{
|
8
|
(echo '\\timing on'; cat)|\
|
9
|
(set -x; "time" "$selfDir/psql_script_vegbien" --echo-all)
|
10
|
}
|
11
|
|
12
|
psql <<EOF
|
13
|
SELECT make_family_higher_plant_group();
|
14
|
|
15
|
TRUNCATE analytical_stem;
|
16
|
INSERT INTO analytical_stem SELECT * FROM analytical_stem_view;
|
17
|
TRUNCATE analytical_aggregate;
|
18
|
INSERT INTO analytical_aggregate SELECT * FROM analytical_aggregate_view;
|
19
|
TRUNCATE geoscrub_input;
|
20
|
INSERT INTO geoscrub_input SELECT * FROM geoscrub_input_view;
|
21
|
EOF
|