Project

General

Profile

« Previous | Next » 

Revision 8322

inputs/FIA/occurrence_all/import: Use new force_update_view(), which only drops the view if its columns have changed and otherwise just uses CREATE OR REPLACE VIEW, rather than always first running DROP VIEW IF EXISTS

View differences:

inputs/FIA/occurrence_all/import
4 4
. ../../../lib/import.sh
5 5

  
6 6
psql <<'EOF'
7
DROP VIEW IF EXISTS occurrence_all;
8
CREATE OR REPLACE VIEW occurrence_all AS
7
SELECT force_update_view('"occurrence_all"', $$
9 8
SELECT *
10 9
/* directional joins ensure that the PostgreSQL query planner always joins
11 10
starting with the TREE table */
......
20 19
	NATURAL LEFT JOIN "REF_SPECIES"
21 20
	NATURAL LEFT JOIN "REF_PLANT_DICTIONARY"
22 21
)))))))
22
$$);
23 23
EOF
24 24

  
25 25
remake_VegBIEN_mappings

Also available in: Unified diff