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
FROM               ("REF_RESEARCH_STATION"
8
NATURAL RIGHT JOIN ("REF_UNIT"
9
NATURAL RIGHT JOIN ("COUNTY"
10
NATURAL RIGHT JOIN ("PLOT"
11
NATURAL RIGHT JOIN ("COND"
12
	NATURAL LEFT JOIN "REF_HABTYP_DESCRIPTION"
13
NATURAL RIGHT JOIN ("SUBPLOT"
14
NATURAL RIGHT JOIN ("TREE"
15
	NATURAL LEFT JOIN "REF_SPECIES"
16
	NATURAL LEFT JOIN "REF_PLANT_DICTIONARY"
17
)))))))
18 8322 aaronmk
$$);
19 8332 aaronmk
20
SELECT mk_subset_by_row_num_func('"occurrence_all"', 'occurrence_all-row_num');