Revision 14438
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/bin/make_analytical_db | ||
---|---|---|
15 | 15 |
sleep 5 # wait for tnrs.make to acquire the lock if being run right after import |
16 | 16 |
"$selfDir/waitself" "$selfDir/../inputs/.TNRS/tnrs/tnrs.make" |
17 | 17 |
|
18 |
mk_table() |
|
19 |
{ |
|
20 |
local table="$1" |
|
21 |
local public_table="\"$public\".$table" |
|
22 |
cat <<EOF |
|
23 |
-- Create $table |
|
24 |
TRUNCATE $public_table; |
|
25 |
INSERT INTO $public_table SELECT * FROM ${public_table}_view; |
|
26 |
ANALYZE $public_table; |
|
27 |
EOF |
|
28 |
} |
|
29 |
|
|
30 | 18 |
((set -x; "$selfDir/psql_verbose_vegbien") <<EOF |
31 | 19 |
SELECT iucn_red_list_view_modify(); |
32 | 20 |
SELECT geoscrub_input_view_modify(); |
Also available in: Unified diff
bin/make_analytical_db: removed no longer used mk_table()