Project

General

Profile

1
--
2
-- PostgreSQL database dump
3
--
4

    
5
SET statement_timeout = 0;
6
SET client_encoding = 'UTF8';
7
SET standard_conforming_strings = on;
8
SET check_function_bodies = false;
9
SET client_min_messages = warning;
10

    
11
--
12
-- Name: TNRS; Type: SCHEMA; Schema: -; Owner: bien
13
--
14

    
15
CREATE SCHEMA "TNRS";
16

    
17

    
18
ALTER SCHEMA "TNRS" OWNER TO bien;
19

    
20
SET search_path = "TNRS", pg_catalog;
21

    
22
--
23
-- Name: score_ok(double precision); Type: FUNCTION; Schema: TNRS; Owner: bien
24
--
25

    
26
CREATE FUNCTION score_ok(score double precision) RETURNS boolean
27
    LANGUAGE sql
28
    AS $_$
29
SELECT $1 >= 0.8
30
$_$;
31

    
32

    
33
ALTER FUNCTION "TNRS".score_ok(score double precision) OWNER TO bien;
34

    
35
--
36
-- Name: tnrs_populate_fields(); Type: FUNCTION; Schema: TNRS; Owner: bien
37
--
38

    
39
CREATE FUNCTION tnrs_populate_fields() RETURNS trigger
40
    LANGUAGE plpgsql
41
    AS $$
42
DECLARE
43
    "Specific_epithet_is_plant" boolean :=
44
        (CASE
45
        WHEN   new."Infraspecific_epithet_matched"   IS NOT NULL
46
            OR new."Infraspecific_epithet_2_matched" IS NOT NULL
47
            OR new."Specific_epithet_score" >= 0.9 -- fuzzy match
48
            THEN true
49
        ELSE NULL -- ambiguous
50
        END);
51
    family_is_homonym boolean = EXISTS(SELECT * FROM "IRMNG".family_homonym_epithet WHERE "taxonNameOrEpithet" = new."Family_matched");
52
    genus_is_homonym  boolean = EXISTS(SELECT * FROM "IRMNG".genus_homonym_epithet  WHERE "taxonNameOrEpithet" = new."Genus_matched");
53
BEGIN
54
    new."Accepted_scientific_name" = NULLIF(concat_ws(' '
55
        , NULLIF(NULLIF(new."Accepted_name_family", 'Unknown'), new."Accepted_name")
56
        , new."Accepted_name"
57
        , new."Accepted_name_author"
58
    ), '');
59
    new."Max_score" = GREATEST(
60
          new."Overall_score"
61
        , new."Family_score"
62
        , new."Genus_score"
63
        , new."Specific_epithet_score"
64
    );
65
    new."Is_homonym" = (CASE
66
        WHEN new."Author_matched" IS NOT NULL THEN false -- author disambiguates
67
        ELSE family_is_homonym OR genus_is_homonym
68
        END);
69
    new."Is_plant" = (CASE
70
        WHEN new."Family_score" = 1 THEN true -- exact match
71
        ELSE -- Family_matched IS NULL
72
            (CASE
73
            WHEN new."Genus_score" =  1    -- exact match
74
                THEN "Specific_epithet_is_plant"
75
            WHEN new."Genus_score" >= 0.85 -- fuzzy match
76
                THEN "Specific_epithet_is_plant"
77
            ELSE NULL -- ambiguous
78
            END)
79
        END);
80
    
81
    RETURN new;
82
END;
83
$$;
84

    
85

    
86
ALTER FUNCTION "TNRS".tnrs_populate_fields() OWNER TO bien;
87

    
88
SET default_tablespace = '';
89

    
90
SET default_with_oids = false;
91

    
92
--
93
-- Name: tnrs; Type: TABLE; Schema: TNRS; Owner: bien; Tablespace: 
94
--
95

    
96
CREATE TABLE tnrs (
97
    "Time_submitted" timestamp with time zone DEFAULT now() NOT NULL,
98
    "Name_number" integer NOT NULL,
99
    "Name_submitted" text NOT NULL,
100
    "Overall_score" double precision,
101
    "Name_matched" text,
102
    "Name_matched_rank" text,
103
    "Name_score" double precision,
104
    "Name_matched_author" text,
105
    "Name_matched_url" text,
106
    "Author_matched" text,
107
    "Author_score" double precision,
108
    "Family_matched" text,
109
    "Family_score" double precision,
110
    "Name_matched_accepted_family" text,
111
    "Genus_matched" text,
112
    "Genus_score" double precision,
113
    "Specific_epithet_matched" text,
114
    "Specific_epithet_score" double precision,
115
    "Infraspecific_rank" text,
116
    "Infraspecific_epithet_matched" text,
117
    "Infraspecific_epithet_score" double precision,
118
    "Infraspecific_rank_2" text,
119
    "Infraspecific_epithet_2_matched" text,
120
    "Infraspecific_epithet_2_score" double precision,
121
    "Annotations" text,
122
    "Unmatched_terms" text,
123
    "Taxonomic_status" text,
124
    "Accepted_name" text,
125
    "Accepted_name_author" text,
126
    "Accepted_name_rank" text,
127
    "Accepted_name_url" text,
128
    "Accepted_name_species" text,
129
    "Accepted_name_family" text,
130
    "Selected" text,
131
    "Source" text,
132
    "Warnings" text,
133
    "Accepted_name_lsid" text,
134
    "Accepted_scientific_name" text,
135
    "Max_score" double precision,
136
    "Is_homonym" boolean,
137
    "Is_plant" boolean
138
);
139

    
140

    
141
ALTER TABLE "TNRS".tnrs OWNER TO bien;
142

    
143
--
144
-- Name: AcceptedTaxon; Type: VIEW; Schema: TNRS; Owner: bien
145
--
146

    
147
CREATE VIEW "AcceptedTaxon" AS
148
    SELECT tnrs."Time_submitted" AS "*Accepted_name.Time_submitted", tnrs."Name_submitted" AS "acceptedScientificName", tnrs."Genus_matched" AS "acceptedGenus", tnrs."Specific_epithet_matched" AS "acceptedSpecificEpithet", tnrs."Infraspecific_epithet_matched" AS "acceptedInfraspecificEpithet", tnrs."Annotations" AS "*Accepted_name.Annotations", tnrs."Taxonomic_status" AS "acceptedTaxonomicStatus", tnrs."Selected" AS "*Accepted_name.Selected", tnrs."Source" AS "*Accepted_name.Source", tnrs."Warnings" AS "*Accepted_name.Warnings", tnrs."Accepted_name_lsid" AS "*Accepted_name.Accepted_name_lsid" FROM tnrs;
149

    
150

    
151
ALTER TABLE "TNRS"."AcceptedTaxon" OWNER TO bien;
152

    
153
--
154
-- Name: MatchedTaxon; Type: VIEW; Schema: TNRS; Owner: bien
155
--
156

    
157
CREATE VIEW "MatchedTaxon" AS
158
    SELECT tnrs."Time_submitted" AS "*Name_matched.Time_submitted", tnrs."Name_submitted" AS "concatenatedScientificName", tnrs."Name_matched" AS "matchedTaxonName", tnrs."Name_matched_rank" AS "matchedTaxonRank", tnrs."Name_score" AS "*Name_matched.Name_score", tnrs."Name_matched_author" AS "matchedScientificNameAuthorship", tnrs."Name_matched_url" AS "matchedScientificNameID", tnrs."Author_score" AS "*Name_matched.Author_score", tnrs."Family_score" AS "matchedFamilyConfidence_fraction", COALESCE(tnrs."Name_matched_accepted_family", tnrs."Accepted_name_family") AS "matchedFamily", tnrs."Genus_matched" AS "matchedGenus", tnrs."Genus_score" AS "matchedGenusConfidence_fraction", tnrs."Specific_epithet_matched" AS "matchedSpecificEpithet", tnrs."Specific_epithet_score" AS "matchedSpeciesConfidence_fraction", tnrs."Infraspecific_epithet_matched" AS "matchedInfraspecificEpithet", tnrs."Infraspecific_epithet_score" AS "*Name_matched.Infraspecific_epithet_score", tnrs."Annotations" AS "identificationQualifier", tnrs."Unmatched_terms" AS "morphospeciesSuffix", tnrs."Taxonomic_status" AS "taxonomicStatus", tnrs."Accepted_name" AS "acceptedTaxonName", tnrs."Accepted_name_author" AS "acceptedScientificNameAuthorship", tnrs."Accepted_name_rank" AS "acceptedTaxonRank", tnrs."Accepted_name_url" AS "acceptedScientificNameID", tnrs."Accepted_name_species" AS "*Name_matched.Accepted_name_species", tnrs."Accepted_name_family" AS "acceptedFamily", tnrs."Selected" AS "*Name_matched.Selected", tnrs."Source" AS "*Name_matched.Source", tnrs."Warnings" AS "*Name_matched.Warnings", tnrs."Accepted_name_lsid" AS "*Name_matched.Accepted_name_lsid", tnrs."Accepted_scientific_name" AS "acceptedScientificName", tnrs."Max_score" AS "matchedTaxonConfidence_fraction" FROM tnrs;
159

    
160

    
161
ALTER TABLE "TNRS"."MatchedTaxon" OWNER TO bien;
162

    
163
--
164
-- Name: ValidMatchedTaxon; Type: VIEW; Schema: TNRS; Owner: bien
165
--
166

    
167
CREATE VIEW "ValidMatchedTaxon" AS
168
    SELECT "MatchedTaxon"."*Name_matched.Time_submitted", "MatchedTaxon"."concatenatedScientificName", "MatchedTaxon"."matchedTaxonName", "MatchedTaxon"."matchedTaxonRank", "MatchedTaxon"."*Name_matched.Name_score", "MatchedTaxon"."matchedScientificNameAuthorship", "MatchedTaxon"."matchedScientificNameID", "MatchedTaxon"."*Name_matched.Author_score", "MatchedTaxon"."matchedFamilyConfidence_fraction", "MatchedTaxon"."matchedFamily", "MatchedTaxon"."matchedGenus", "MatchedTaxon"."matchedGenusConfidence_fraction", "MatchedTaxon"."matchedSpecificEpithet", "MatchedTaxon"."matchedSpeciesConfidence_fraction", "MatchedTaxon"."matchedInfraspecificEpithet", "MatchedTaxon"."*Name_matched.Infraspecific_epithet_score", "MatchedTaxon"."identificationQualifier", "MatchedTaxon"."morphospeciesSuffix", "MatchedTaxon"."taxonomicStatus", "MatchedTaxon"."acceptedTaxonName", "MatchedTaxon"."acceptedScientificNameAuthorship", "MatchedTaxon"."acceptedTaxonRank", "MatchedTaxon"."acceptedScientificNameID", "MatchedTaxon"."*Name_matched.Accepted_name_species", "MatchedTaxon"."acceptedFamily", "MatchedTaxon"."*Name_matched.Selected", "MatchedTaxon"."*Name_matched.Source", "MatchedTaxon"."*Name_matched.Warnings", "MatchedTaxon"."*Name_matched.Accepted_name_lsid", "MatchedTaxon"."acceptedScientificName", "MatchedTaxon"."matchedTaxonConfidence_fraction" FROM "MatchedTaxon" WHERE score_ok("MatchedTaxon"."matchedTaxonConfidence_fraction");
169

    
170

    
171
ALTER TABLE "TNRS"."ValidMatchedTaxon" OWNER TO bien;
172

    
173
--
174
-- Name: ScrubbedTaxon; Type: VIEW; Schema: TNRS; Owner: bien
175
--
176

    
177
CREATE VIEW "ScrubbedTaxon" AS
178
    SELECT "ValidMatchedTaxon"."acceptedScientificName", "ValidMatchedTaxon"."*Name_matched.Time_submitted", "ValidMatchedTaxon"."concatenatedScientificName", "ValidMatchedTaxon"."matchedTaxonName", "ValidMatchedTaxon"."matchedTaxonRank", "ValidMatchedTaxon"."*Name_matched.Name_score", "ValidMatchedTaxon"."matchedScientificNameAuthorship", "ValidMatchedTaxon"."matchedScientificNameID", "ValidMatchedTaxon"."*Name_matched.Author_score", "ValidMatchedTaxon"."matchedFamilyConfidence_fraction", "ValidMatchedTaxon"."matchedFamily", "ValidMatchedTaxon"."matchedGenus", "ValidMatchedTaxon"."matchedGenusConfidence_fraction", "ValidMatchedTaxon"."matchedSpecificEpithet", "ValidMatchedTaxon"."matchedSpeciesConfidence_fraction", "ValidMatchedTaxon"."matchedInfraspecificEpithet", "ValidMatchedTaxon"."*Name_matched.Infraspecific_epithet_score", "ValidMatchedTaxon"."identificationQualifier", "ValidMatchedTaxon"."morphospeciesSuffix", "ValidMatchedTaxon"."taxonomicStatus", "ValidMatchedTaxon"."acceptedTaxonName", "ValidMatchedTaxon"."acceptedScientificNameAuthorship", "ValidMatchedTaxon"."acceptedTaxonRank", "ValidMatchedTaxon"."acceptedScientificNameID", "ValidMatchedTaxon"."*Name_matched.Accepted_name_species", "ValidMatchedTaxon"."acceptedFamily", "ValidMatchedTaxon"."*Name_matched.Selected", "ValidMatchedTaxon"."*Name_matched.Source", "ValidMatchedTaxon"."*Name_matched.Warnings", "ValidMatchedTaxon"."*Name_matched.Accepted_name_lsid", "ValidMatchedTaxon"."matchedTaxonConfidence_fraction", "AcceptedTaxon"."*Accepted_name.Time_submitted", "AcceptedTaxon"."acceptedGenus", "AcceptedTaxon"."acceptedSpecificEpithet", "AcceptedTaxon"."acceptedInfraspecificEpithet", "AcceptedTaxon"."*Accepted_name.Annotations", "AcceptedTaxon"."acceptedTaxonomicStatus", "AcceptedTaxon"."*Accepted_name.Selected", "AcceptedTaxon"."*Accepted_name.Source", "AcceptedTaxon"."*Accepted_name.Warnings", "AcceptedTaxon"."*Accepted_name.Accepted_name_lsid" FROM ("ValidMatchedTaxon" NATURAL LEFT JOIN "AcceptedTaxon");
179

    
180

    
181
ALTER TABLE "TNRS"."ScrubbedTaxon" OWNER TO bien;
182

    
183
--
184
-- Data for Name: tnrs; Type: TABLE DATA; Schema: TNRS; Owner: bien
185
--
186

    
187
COPY tnrs ("Time_submitted", "Name_number", "Name_submitted", "Overall_score", "Name_matched", "Name_matched_rank", "Name_score", "Name_matched_author", "Name_matched_url", "Author_matched", "Author_score", "Family_matched", "Family_score", "Name_matched_accepted_family", "Genus_matched", "Genus_score", "Specific_epithet_matched", "Specific_epithet_score", "Infraspecific_rank", "Infraspecific_epithet_matched", "Infraspecific_epithet_score", "Infraspecific_rank_2", "Infraspecific_epithet_2_matched", "Infraspecific_epithet_2_score", "Annotations", "Unmatched_terms", "Taxonomic_status", "Accepted_name", "Accepted_name_author", "Accepted_name_rank", "Accepted_name_url", "Accepted_name_species", "Accepted_name_family", "Selected", "Source", "Warnings", "Accepted_name_lsid", "Accepted_scientific_name", "Max_score", "Is_homonym", "Is_plant") FROM stdin;
188
2013-06-20 07:55:58.532661-07	0	Fam_indet. Boyle#6501	0	No suitable matches found.	\N	0	\N	\N	\N	0	\N	0	\N	\N	0	\N	0	\N	\N	0	\N	\N	0	\N	\N	\N	\N	\N	\N	\N	\N	\N	true	\N	 	\N	\N	0	f	\N
189
2013-06-20 07:55:58.532661-07	1	Poa annua var. eriolepis	1	Poa annua var. eriolepis	variety	1	E. Desv.	http://www.tropicos.org/Name/50119145	\N	\N	\N	\N	Poaceae	Poa	1	annua	1	var.	eriolepis	1	\N	\N	\N	\N	\N	Synonym	Poa annua	L.	species	http://www.tropicos.org/Name/25509881	Poa annua	Poaceae	true	tropicos	 	\N	Poaceae Poa annua L.	1	f	t
190
2013-06-20 07:55:58.532661-07	2	Poa annua	1	Poa annua	species	1	L.	http://www.tropicos.org/Name/25509881	\N	\N	\N	\N	Poaceae	Poa	1	annua	1	\N	\N	\N	\N	\N	\N	\N	\N	Accepted	Poa annua	L.	species	http://www.tropicos.org/Name/25509881	Poa annua	Poaceae	true	tropicos	 	\N	Poaceae Poa annua L.	1	f	t
191
2013-06-20 07:55:58.532661-07	3	Silene scouleri Hook. subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire var. grisea C.L. Hitchc. & Maguire	0.770000000000000018	Silene scouleri subsp. pringlei	subspecies	0.770000000000000018	(S. Watson) C.L. Hitchc. & Maguire	http://www.tropicos.org/Name/6303627	\N	\N	\N	\N	Caryophyllaceae	Silene	1	scouleri	1	subsp.	pringlei	1	\N	\N	\N	\N	var. grisea	Accepted	Silene scouleri subsp. pringlei	(S. Watson) C.L. Hitchc. & Maguire	subspecies	http://www.tropicos.org/Name/6303627	Silene scouleri	Caryophyllaceae	true	tropicos	 [Partial match] 	\N	Caryophyllaceae Silene scouleri subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire	1	t	t
192
2013-06-20 07:55:58.532661-07	4	Fabaceae Boyle#6500	0.900000000000000022	Fabaceae	family	1	Lindl.	http://www.tropicos.org/Name/42000184	\N	\N	Fabaceae	1	Fabaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Boyle#6500	Accepted	Fabaceae	Lindl.	family	http://www.tropicos.org/Name/42000184	\N	Fabaceae	true	tropicos	 	\N	Fabaceae Lindl.	1	f	t
193
2013-06-20 07:55:58.532661-07	5	Poa annua subsp. exilis	1	Poa annua subsp. exilis	subspecies	1	(Tomm. ex Freyn) Asch. & Graebn.	http://www.tropicos.org/Name/50063800	\N	\N	\N	\N	Poaceae	Poa	1	annua	1	subsp.	exilis	1	\N	\N	\N	\N	\N	Synonym	Poa infirma	Kunth	species	http://www.tropicos.org/Name/25514158	Poa infirma	Poaceae	true	tropicos	 	\N	Poaceae Poa infirma Kunth	1	f	t
194
2013-06-20 07:55:58.532661-07	6	Poa annua ssp. exilis	1	Poa annua subsp. exilis	subspecies	1	(Tomm. ex Freyn) Asch. & Graebn.	http://www.tropicos.org/Name/50063800	\N	\N	\N	\N	Poaceae	Poa	1	annua	1	subsp.	exilis	1	\N	\N	\N	\N	\N	Synonym	Poa infirma	Kunth	species	http://www.tropicos.org/Name/25514158	Poa infirma	Poaceae	true	tropicos	 	\N	Poaceae Poa infirma Kunth	1	f	t
195
2013-06-20 07:55:58.532661-07	7	Poa annua subvar. minima	1	Poa annua subvar. minima	subvariety	1	(Schur) Asch. & Graebn.	http://www.tropicos.org/Name/50158097	\N	\N	\N	\N	Poaceae	Poa	1	annua	1	subvar.	minima	1	\N	\N	\N	\N	\N	Accepted	Poa annua subvar. minima	(Schur) Asch. & Graebn.	subvariety	http://www.tropicos.org/Name/50158097	Poa annua	Poaceae	true	tropicos	 	\N	Poaceae Poa annua subvar. minima (Schur) Asch. & Graebn.	1	f	t
196
2013-06-20 07:55:58.532661-07	8	Poa annua L.	1	Poa annua	species	1	L.	http://www.tropicos.org/Name/25509881	L.	1	\N	\N	Poaceae	Poa	1	annua	1	\N	\N	\N	\N	\N	\N	\N	\N	Accepted	Poa annua	L.	species	http://www.tropicos.org/Name/25509881	Poa annua	Poaceae	true	tropicos	 	\N	Poaceae Poa annua L.	1	f	t
197
2013-06-20 07:55:58.532661-07	9	Compositae indet. sp.1	0.900000000000000022	Compositae	family	1	Giseke	http://www.tropicos.org/Name/50255940	\N	\N	Compositae	1	Compositae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	indet. sp.1	Synonym	Asteraceae	Bercht. & J. Presl	family	http://www.tropicos.org/Name/50307371	\N	Asteraceae	true	tropicos	 	\N	Asteraceae Bercht. & J. Presl	1	f	t
198
2013-06-20 07:55:58.532661-07	10	Poa annua fo. lanuginosa	1	Poa annua fo. lanuginosa	forma	1	Sennen	http://www.tropicos.org/Name/50267771	\N	\N	\N	\N	Poaceae	Poa	1	annua	1	fo.	lanuginosa	1	\N	\N	\N	\N	\N	Synonym	Poa annua var. annua	\N	variety	http://www.tropicos.org/Name/25517736	Poa annua	Poaceae	true	tropicos	 	\N	Poaceae Poa annua var. annua	1	f	t
199
2013-06-20 07:55:58.532661-07	11	Silene scouleri subsp. pringlei var. grisea C.L. Hitchc. & Maguire	0.770000000000000018	Silene scouleri subsp. pringlei	subspecies	0.770000000000000018	(S. Watson) C.L. Hitchc. & Maguire	http://www.tropicos.org/Name/6303627	\N	\N	\N	\N	Caryophyllaceae	Silene	1	scouleri	1	subsp.	pringlei	1	\N	\N	\N	\N	var. grisea	Accepted	Silene scouleri subsp. pringlei	(S. Watson) C.L. Hitchc. & Maguire	subspecies	http://www.tropicos.org/Name/6303627	Silene scouleri	Caryophyllaceae	true	tropicos	 [Partial match] 	\N	Caryophyllaceae Silene scouleri subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire	1	t	t
200
2013-06-20 07:55:58.532661-07	12	Fabaceae Inga "fuzzy leaf"	0.900000000000000022	Inga	genus	1	Mill.	http://www.tropicos.org/Name/40031040	\N	\N	Fabaceae	1	Fabaceae	Inga	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	"fuzzy leaf"	Accepted	Inga	Mill.	genus	http://www.tropicos.org/Name/40031040	\N	Fabaceae	true	tropicos	 	\N	Fabaceae Inga Mill.	1	t	t
201
2013-06-20 07:55:58.532661-07	13	Fabaceae Inga sp.3	0.900000000000000022	Inga	genus	1	Mill.	http://www.tropicos.org/Name/40031040	\N	\N	Fabaceae	1	Fabaceae	Inga	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	sp.3	Accepted	Inga	Mill.	genus	http://www.tropicos.org/Name/40031040	\N	Fabaceae	true	tropicos	 	\N	Fabaceae Inga Mill.	1	t	t
202
2013-06-20 07:55:58.532661-07	14	Fabaceae unknown #2	0.900000000000000022	Fabaceae	family	1	Lindl.	http://www.tropicos.org/Name/42000184	\N	\N	Fabaceae	1	Fabaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	unknown #2	Accepted	Fabaceae	Lindl.	family	http://www.tropicos.org/Name/42000184	\N	Fabaceae	true	tropicos	 	\N	Fabaceae Lindl.	1	f	t
203
2013-06-20 07:56:01.42646-07	0	Poaceae Poa infirma Kunth	1	Poa infirma	species	1	Kunth	http://www.tropicos.org/Name/25514158	Kunth	1	Poaceae	1	Poaceae	Poa	1	infirma	1	\N	\N	\N	\N	\N	\N	\N	\N	Accepted	Poa infirma	Kunth	species	http://www.tropicos.org/Name/25514158	Poa infirma	Poaceae	true	tropicos	 	\N	Poaceae Poa infirma Kunth	1	f	t
204
2013-06-20 07:56:01.42646-07	1	Fabaceae Lindl.	0.5	Fabaceae	family	0.5	Lindl.	http://www.tropicos.org/Name/42000184	\N	\N	Fabaceae	1	Fabaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Lindl.	Accepted	Fabaceae	Lindl.	family	http://www.tropicos.org/Name/42000184	\N	Fabaceae	true	tropicos	 [Partial match] 	\N	Fabaceae Lindl.	1	f	t
205
2013-06-20 07:56:01.42646-07	2	Poaceae Poa annua subvar. minima (Schur) Asch. & Graebn.	1	Poa annua subvar. minima	subvariety	1	(Schur) Asch. & Graebn.	http://www.tropicos.org/Name/50158097	(Schur) Asch. & Graebn.	1	Poaceae	1	Poaceae	Poa	1	annua	1	subvar.	minima	1	\N	\N	\N	\N	\N	Accepted	Poa annua subvar. minima	(Schur) Asch. & Graebn.	subvariety	http://www.tropicos.org/Name/50158097	Poa annua	Poaceae	true	tropicos	 	\N	Poaceae Poa annua subvar. minima (Schur) Asch. & Graebn.	1	f	t
206
2013-06-20 07:56:01.42646-07	3	Fabaceae Inga Mill.	1	Inga	genus	1	Mill.	http://www.tropicos.org/Name/40031040	Mill.	1	Fabaceae	1	Fabaceae	Inga	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Accepted	Inga	Mill.	genus	http://www.tropicos.org/Name/40031040	\N	Fabaceae	true	tropicos	 	\N	Fabaceae Inga Mill.	1	f	t
207
2013-06-20 07:56:01.42646-07	4	Caryophyllaceae Silene scouleri subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire	1	Silene scouleri subsp. pringlei	subspecies	1	(S. Watson) C.L. Hitchc. & Maguire	http://www.tropicos.org/Name/6303627	(S. Watson) C.L. Hitchc. & Maguire	1	Caryophyllaceae	1	Caryophyllaceae	Silene	1	scouleri	1	subsp.	pringlei	1	\N	\N	\N	\N	\N	Accepted	Silene scouleri subsp. pringlei	(S. Watson) C.L. Hitchc. & Maguire	subspecies	http://www.tropicos.org/Name/6303627	Silene scouleri	Caryophyllaceae	true	tropicos	 	\N	Caryophyllaceae Silene scouleri subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire	1	f	t
208
2013-06-20 07:56:01.42646-07	5	Poaceae Poa annua L.	1	Poa annua	species	1	L.	http://www.tropicos.org/Name/25509881	L.	1	Poaceae	1	Poaceae	Poa	1	annua	1	\N	\N	\N	\N	\N	\N	\N	\N	Accepted	Poa annua	L.	species	http://www.tropicos.org/Name/25509881	Poa annua	Poaceae	true	tropicos	 	\N	Poaceae Poa annua L.	1	f	t
209
2013-06-20 07:56:01.42646-07	6	Asteraceae Bercht. & J. Presl	0.400000000000000022	Asteraceae	family	0.5	\N	http://compositae.landcareresearch.co.nz/default.aspx	\N	\N	Asteraceae	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Bercht. & J. Presl	Accepted	Asteraceae	\N	family	http://compositae.landcareresearch.co.nz/default.aspx	\N	\N	true	gcc	 [Partial match] 	\N	Asteraceae	1	f	t
210
2013-06-20 07:56:01.42646-07	7	Poaceae Poa annua var. annua	1	Poa annua var. annua	variety	1	\N	http://www.tropicos.org/Name/25517736	\N	\N	Poaceae	1	Poaceae	Poa	1	annua	1	var.	annua	1	\N	\N	\N	\N	\N	Accepted	Poa annua var. annua	\N	variety	http://www.tropicos.org/Name/25517736	Poa annua	Poaceae	true	tropicos	 	\N	Poaceae Poa annua var. annua	1	f	t
211
2013-06-20 07:56:03.390156-07	0	Asteraceae	1	Asteraceae	family	1	\N	http://compositae.landcareresearch.co.nz/default.aspx	\N	\N	Asteraceae	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Accepted	Asteraceae	\N	family	http://compositae.landcareresearch.co.nz/default.aspx	\N	\N	true	gcc	 	\N	Asteraceae	1	f	t
212
\.
213

    
214

    
215
--
216
-- Name: tnrs_Name_submitted_key; Type: CONSTRAINT; Schema: TNRS; Owner: bien; Tablespace: 
217
--
218

    
219
ALTER TABLE ONLY tnrs
220
    ADD CONSTRAINT "tnrs_Name_submitted_key" UNIQUE ("Name_submitted");
221

    
222

    
223
--
224
-- Name: tnrs_pkey; Type: CONSTRAINT; Schema: TNRS; Owner: bien; Tablespace: 
225
--
226

    
227
ALTER TABLE ONLY tnrs
228
    ADD CONSTRAINT tnrs_pkey PRIMARY KEY ("Time_submitted", "Name_number");
229

    
230

    
231
--
232
-- Name: tnrs_score_ok; Type: INDEX; Schema: TNRS; Owner: bien; Tablespace: 
233
--
234

    
235
CREATE UNIQUE INDEX tnrs_score_ok ON tnrs USING btree ("Name_submitted") WHERE score_ok("Max_score");
236

    
237

    
238
--
239
-- Name: tnrs_populate_fields; Type: TRIGGER; Schema: TNRS; Owner: bien
240
--
241

    
242
CREATE TRIGGER tnrs_populate_fields BEFORE INSERT OR UPDATE ON tnrs FOR EACH ROW EXECUTE PROCEDURE tnrs_populate_fields();
243

    
244

    
245
--
246
-- PostgreSQL database dump complete
247
--
248

    
(1-1/2)