Project

General

Profile

1 10084 aaronmk
SELECT util.search_path_append('util');
2 8165 aaronmk
3 8322 aaronmk
SELECT force_update_view('"occurrence_all"', $$
4 10054 aaronmk
SELECT "*TREE-row_num" AS "occurrence_all-row_num", *
5 8317 aaronmk
/* directional joins ensure that the PostgreSQL query planner always joins
6
starting with the TREE table */
7 10930 aaronmk
FROM              "TREE"
8
NATURAL LEFT JOIN "REF_SPECIES"
9
NATURAL LEFT JOIN "REF_PLANT_DICTIONARY"
10
NATURAL LEFT JOIN "SUBPLOT"
11
NATURAL LEFT JOIN "COND"
12
NATURAL LEFT JOIN "REF_HABTYP_DESCRIPTION"
13
NATURAL LEFT JOIN "PLOT"
14
NATURAL LEFT JOIN "COUNTY"
15
NATURAL LEFT JOIN "REF_UNIT"
16
NATURAL LEFT JOIN "REF_RESEARCH_STATION"
17 8322 aaronmk
$$);
18 8332 aaronmk
19
SELECT mk_subset_by_row_num_func('"occurrence_all"', 'occurrence_all-row_num');