Project

General

Profile

1
SELECT util.search_path_append('util');
2

    
3

    
4
-- remove private data that should not be publicly visible
5
DELETE FROM :table WHERE allow_download_all = 0
6
-- includes all the projects at wiki.vegpath.org/2013-10-25_conference_call#SALVIAS-deduplication
7
; -- runtime: 0.1 s ("72.820 ms") @starscream
8
/*
9
"`ipr_specific` 
10
LONGTEXT, Values: unconstrained, DEFAULT: "There are no specific use conditions attached 
11
to this dataset. For general use conditions, see SALVIAS General Participant Agreement at 
12
http://www.salvias.net/eula/eula1.html"
13
" (http://vegpath.org/fs/inputs/SALVIAS/_src/salvias_data_access_controls.txt)
14
*/
15
DELETE FROM :table WHERE NOT COALESCE(ipr_specific IN (
16
  'There are no specific use conditions attached to this dataset. For general use conditions, see SALVIAS General Participant Agreement at http://www.salvias.net/eula/eula1.html'
17
/* datasets with ipr_specific = '' *are* actually redistributable. when this
18
field is blank, this just means it was not yet updated with the string above.
19
(Brad, http://wiki.vegpath.org/2014-04-17_conference_call#conditions-of-use) */
20
, ''
21
), false); -- runtime: 0.2 s ("157.295 ms") @starscream
22

    
23

    
24
-- remove institutions that we have direct data for
25
DELETE FROM :table
26
WHERE project_name IN (
27
	/* from mailto:bboyle@email.arizona.edu?Brad_Boyle.2013-10-28:12:27.Re:+Removing+duplicates+from+SALVIAS+plots ,
28
	wiki.vegpath.org/2013-10-25_conference_call#SALVIAS-deduplication : */
29
	-- Madidi
30
	  'Madidi Transects'
31
	, 'Madidi Permanent Plots'
32
	, 'Madidi Savana Line Transects'
33
	-- VegBank
34
	, 'INW Vegetation Plots'
35
-- most of the 13139 removed plots are from duplicates (13699 - 560)
36
); -- runtime: 10 s ("10193.125 ms") @starscream
37

    
38

    
39
-- remove example data
40
DELETE FROM :table
41
WHERE project_name IN (
42
	/* from mailto:bboyle@email.arizona.edu?Brad_Boyle.2013-10-28:12:27.Re:+Removing+duplicates+from+SALVIAS+plots ,
43
	wiki.vegpath.org/2013-10-25_conference_call#SALVIAS-deduplication : */
44
	  'nsf_example'
45
); -- runtime: ~0 ("1.476 ms") @starscream
(5-5/7)