Project

General

Profile

« Previous | Next » 

Revision 10395

reran inputs/test_taxonomic_names/test_scrub, which generates the public.test_taxonomic_names sample schema

View differences:

inputs/test_taxonomic_names/_scrub/TNRS.sql
20 20
SET search_path = "TNRS", pg_catalog;
21 21

  
22 22
--
23
-- Name: family_is_homonym(text); Type: FUNCTION; Schema: TNRS; Owner: bien
24
--
25

  
26
CREATE FUNCTION family_is_homonym(family text) RETURNS boolean
27
    LANGUAGE sql STABLE STRICT
28
    AS $_$
29
SELECT EXISTS(SELECT * FROM "IRMNG".family_homonym_epithet WHERE "taxonNameOrEpithet" = $1)
30
$_$;
31

  
32

  
33
ALTER FUNCTION "TNRS".family_is_homonym(family text) OWNER TO bien;
34

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

  
39
CREATE FUNCTION genus_is_homonym(genus text) RETURNS boolean
40
    LANGUAGE sql STABLE STRICT
41
    AS $_$
42
SELECT EXISTS(SELECT * FROM "IRMNG".genus_homonym_epithet WHERE "taxonNameOrEpithet" = $1)
43
$_$;
44

  
45

  
46
ALTER FUNCTION "TNRS".genus_is_homonym(genus text) OWNER TO bien;
47

  
48
--
23 49
-- Name: score_ok(double precision); Type: FUNCTION; Schema: TNRS; Owner: bien
24 50
--
25 51

  
26 52
CREATE FUNCTION score_ok(score double precision) RETURNS boolean
27
    LANGUAGE sql
53
    LANGUAGE sql IMMUTABLE STRICT
28 54
    AS $_$
29 55
SELECT $1 >= 0.8
30 56
$_$;
......
48 74
            THEN true
49 75
        ELSE NULL -- ambiguous
50 76
        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");
77
    never_homonym boolean = COALESCE(new."Author_score" >= 0.6, false); -- author disambiguates
78
    family_is_homonym boolean = NOT never_homonym AND "TNRS".family_is_homonym(new."Family_matched");
79
    genus_is_homonym  boolean = NOT never_homonym AND "TNRS".genus_is_homonym( new."Genus_matched" );
53 80
BEGIN
54 81
    new."Accepted_scientific_name" = NULLIF(concat_ws(' '
55 82
        , NULLIF(NULLIF(new."Accepted_name_family", 'Unknown'), new."Accepted_name")
......
62 89
        , new."Genus_score"
63 90
        , new."Specific_epithet_score"
64 91
    );
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);
92
    new."Is_homonym" = COALESCE(genus_is_homonym, family_is_homonym);
69 93
    new."Is_plant" = (CASE
70
        WHEN new."Family_score" = 1 THEN true -- exact match
71
        ELSE -- Family_matched IS NULL
94
        WHEN new."Family_score" = 1 AND NOT family_is_homonym -- exact match
95
            THEN true
96
        ELSE -- consider genus
72 97
            (CASE
73 98
            WHEN new."Genus_score" =  1    -- exact match
74
                THEN "Specific_epithet_is_plant"
99
                THEN
100
                (CASE
101
                WHEN NOT genus_is_homonym THEN true
102
                ELSE "Specific_epithet_is_plant"
103
                END)
75 104
            WHEN new."Genus_score" >= 0.85 -- fuzzy match
76 105
                THEN "Specific_epithet_is_plant"
77 106
            ELSE NULL -- ambiguous
......
145 174
--
146 175

  
147 176
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;
177
    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."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 178

  
150 179

  
151 180
ALTER TABLE "TNRS"."AcceptedTaxon" OWNER TO bien;
......
175 204
--
176 205

  
177 206
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");
207
    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"."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 208

  
180 209

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

  
183 212
--
213
-- Name: Source; Type: TABLE; Schema: TNRS; Owner: bien; Tablespace: 
214
--
215

  
216
CREATE TABLE "Source" (
217
    "*row_num" integer NOT NULL,
218
    "sourceType" text DEFAULT 'aggregator'::text NOT NULL
219
);
220

  
221

  
222
ALTER TABLE "TNRS"."Source" OWNER TO bien;
223

  
224
--
225
-- Name: COLUMN "Source"."sourceType"; Type: COMMENT; Schema: TNRS; Owner: bien
226
--
227

  
228
COMMENT ON COLUMN "Source"."sourceType" IS 'constant';
229

  
230

  
231
--
232
-- Name: ~Source.map; Type: TABLE; Schema: TNRS; Owner: bien; Tablespace: 
233
--
234

  
235
CREATE TABLE "~Source.map" (
236
    "from" text NOT NULL,
237
    "to" text,
238
    filter text,
239
    notes text
240
);
241

  
242

  
243
ALTER TABLE "TNRS"."~Source.map" OWNER TO bien;
244

  
245
--
246
-- Data for Name: Source; Type: TABLE DATA; Schema: TNRS; Owner: bien
247
--
248

  
249
COPY "Source" ("*row_num", "sourceType") FROM stdin;
250
1	aggregator
251
\.
252

  
253

  
254
--
184 255
-- Data for Name: tnrs; Type: TABLE DATA; Schema: TNRS; Owner: bien
185 256
--
186 257

  
187 258
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
259
2013-07-24 15:11:44.310741-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	\N	\N
260
2013-07-24 15:11:44.310741-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
261
2013-07-24 15:11:44.310741-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
262
2013-07-24 15:11:44.310741-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
263
2013-07-24 15:11:44.310741-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
264
2013-07-24 15:11:44.310741-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
265
2013-07-24 15:11:44.310741-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
266
2013-07-24 15:11:44.310741-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
267
2013-07-24 15:11:44.310741-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
268
2013-07-24 15:11:44.310741-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
269
2013-07-24 15:11:44.310741-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
270
2013-07-24 15:11:44.310741-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
271
2013-07-24 15:11:44.310741-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
272
2013-07-24 15:11:44.310741-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
273
2013-07-24 15:11:44.310741-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
274
2013-07-24 15:11:47.497803-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
275
2013-07-24 15:11:47.497803-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
276
2013-07-24 15:11:47.497803-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
277
2013-07-24 15:11:47.497803-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
278
2013-07-24 15:11:47.497803-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
279
2013-07-24 15:11:47.497803-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
280
2013-07-24 15:11:47.497803-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
281
2013-07-24 15:11:47.497803-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
282
2013-07-24 15:11:49.527902-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 283
\.
213 284

  
214 285

  
215 286
--
287
-- Data for Name: ~Source.map; Type: TABLE DATA; Schema: TNRS; Owner: bien
288
--
289

  
290
COPY "~Source.map" ("from", "to", filter, notes) FROM stdin;
291
row_num	*row_num	\N	\N
292
:aggregator	sourceType	\N	\N
293
\.
294

  
295

  
296
--
297
-- Name: Source_pkey; Type: CONSTRAINT; Schema: TNRS; Owner: bien; Tablespace: 
298
--
299

  
300
ALTER TABLE ONLY "Source"
301
    ADD CONSTRAINT "Source_pkey" PRIMARY KEY ("*row_num");
302

  
303

  
304
--
216 305
-- Name: tnrs_Name_submitted_key; Type: CONSTRAINT; Schema: TNRS; Owner: bien; Tablespace: 
217 306
--
218 307

  
......
229 318

  
230 319

  
231 320
--
321
-- Name: ~Source.map_from_key; Type: CONSTRAINT; Schema: TNRS; Owner: bien; Tablespace: 
322
--
323

  
324
ALTER TABLE ONLY "~Source.map"
325
    ADD CONSTRAINT "~Source.map_from_key" UNIQUE ("from");
326

  
327

  
328
--
329
-- Name: ~Source.map_to_key; Type: CONSTRAINT; Schema: TNRS; Owner: bien; Tablespace: 
330
--
331

  
332
ALTER TABLE ONLY "~Source.map"
333
    ADD CONSTRAINT "~Source.map_to_key" UNIQUE ("to");
334

  
335

  
336
--
232 337
-- Name: tnrs_score_ok; Type: INDEX; Schema: TNRS; Owner: bien; Tablespace: 
233 338
--
234 339

  
......
236 341

  
237 342

  
238 343
--
344
-- Name: map_filter_insert; Type: TRIGGER; Schema: TNRS; Owner: bien
345
--
346

  
347
CREATE TRIGGER map_filter_insert BEFORE INSERT ON "~Source.map" FOR EACH ROW EXECUTE PROCEDURE util.map_filter_insert();
348

  
349
ALTER TABLE "~Source.map" DISABLE TRIGGER map_filter_insert;
350

  
351

  
352
--
239 353
-- Name: tnrs_populate_fields; Type: TRIGGER; Schema: TNRS; Owner: bien
240 354
--
241 355

  
......
243 357

  
244 358

  
245 359
--
360
-- Name: TNRS; Type: ACL; Schema: -; Owner: bien
361
--
362

  
363
REVOKE ALL ON SCHEMA "TNRS" FROM PUBLIC;
364
REVOKE ALL ON SCHEMA "TNRS" FROM bien;
365
GRANT ALL ON SCHEMA "TNRS" TO bien;
366
GRANT USAGE ON SCHEMA "TNRS" TO bien_read;
367

  
368

  
369
--
370
-- Name: tnrs; Type: ACL; Schema: TNRS; Owner: bien
371
--
372

  
373
REVOKE ALL ON TABLE tnrs FROM PUBLIC;
374
REVOKE ALL ON TABLE tnrs FROM bien;
375
GRANT ALL ON TABLE tnrs TO bien;
376
GRANT SELECT ON TABLE tnrs TO bien_read;
377

  
378

  
379
--
246 380
-- PostgreSQL database dump complete
247 381
--
248 382

  
inputs/test_taxonomic_names/_scrub/public.test_taxonomic_names.sql
21 21
-- Name: SCHEMA "public.test_taxonomic_names"; Type: COMMENT; Schema: -; Owner: bien
22 22
--
23 23

  
24
COMMENT ON SCHEMA "public.test_taxonomic_names" IS 'Version: public (2013-6-20 7:56:11 PDT)';
24
COMMENT ON SCHEMA "public.test_taxonomic_names" IS 'Version: public (2013-7-24 15:11:57 PDT)';
25 25

  
26 26

  
27 27
SET search_path = "public.test_taxonomic_names", pg_catalog;
......
2694 2694
--
2695 2695

  
2696 2696
CREATE VIEW analytical_stem_view AS
2697
    SELECT source.shortname AS datasource, sourcelist.name AS "institutionCode", specimenreplicate.collectioncode_dwc AS "collectionCode", specimenreplicate.catalognumber_dwc AS "catalogNumber", specimenreplicate.sourceaccessioncode AS "occurrenceID", canon_place.country, canon_place.stateprovince AS "stateProvince", datasource_place.county, location.locationnarrative AS locality, CASE WHEN (coordinates.latitude_deg IS NOT NULL) THEN coordinates.latitude_deg ELSE county_centroids.latitude END AS "decimalLatitude", CASE WHEN (coordinates.latitude_deg IS NOT NULL) THEN coordinates.longitude_deg ELSE county_centroids.longitude END AS "decimalLongitude", CASE WHEN (coordinates.latitude_deg IS NOT NULL) THEN coordinates.coordsaccuracy_m ELSE _km_to_m(county_centroids.error_km) END AS "coordinateUncertaintyInMeters", CASE WHEN (coordinates.latitude_deg IS NOT NULL) THEN 'source data'::coordinatesource WHEN (county_centroids.row_num IS NOT NULL) THEN 'georeferencing'::coordinatesource ELSE NULL::coordinatesource END AS "coordinateSource_bien", CASE WHEN (coordinates.latitude_deg IS NOT NULL) THEN NULL::text WHEN (county_centroids.row_num IS NOT NULL) THEN 'county centroid'::text ELSE NULL::text END AS "georeferenceProtocol_bien", (canon_place.geovalid)::integer AS geovalid_bien, ("newWorldCountries"."isNewWorld")::integer AS "isNewWorld_bien", COALESCE(project.sourceaccessioncode, project.projectname) AS "projectID", COALESCE(location.sourceaccessioncode, NULLIF(pg_catalog.concat_ws('; '::text, COALESCE(parent_location.sourceaccessioncode, parent_location.authorlocationcode), location.authorlocationcode), ''::text)) AS "locationID", COALESCE(parent_location.authorlocationcode, location.authorlocationcode) AS "locationName", CASE WHEN (parent_location.location_id IS NOT NULL) THEN location.authorlocationcode ELSE NULL::text END AS subplot, plantobservation.authorplantcode AS "individualCode", COALESCE(location.elevation_m, parent_location.elevation_m) AS "elevationInMeters", _m2_to_ha(COALESCE(location.area_m2, parent_location.area_m2)) AS "plotArea_ha", method.name AS "samplingProtocol", COALESCE(locationevent.temperature_c, parent_event.temperature_c) AS "temperature_C", COALESCE(locationevent.precipitation_m, parent_event.precipitation_m) AS precipitation_m, collector.fullname AS "recordedBy", plantobservation.authorplantcode AS "recordNumber", COALESCE(locationevent.obsstartdate, parent_event.obsstartdate, aggregateoccurrence.collectiondate) AS "dateCollected", taxonverbatim.family AS family_verbatim, COALESCE(taxonverbatim.taxonomicname, NULLIF(pg_catalog.concat_ws(' '::text, taxonverbatim.taxonname, taxonverbatim.author), ''::text), taxonlabel.taxonomicname) AS "scientificName_verbatim", identifiedby.fullname AS "identifiedBy", taxondetermination.determinationdate AS "dateIdentified", taxondetermination.notes AS "identificationRemarks", "ScrubbedTaxon"."matchedFamily" AS family_matched, "ScrubbedTaxon"."matchedTaxonName" AS "taxonName_matched", "ScrubbedTaxon"."matchedScientificNameAuthorship" AS "scientificNameAuthorship_matched", family_higher_plant_group.higher_plant_group AS "higherPlantGroup_bien", "ScrubbedTaxon"."acceptedFamily" AS family, "ScrubbedTaxon"."acceptedGenus" AS genus, COALESCE(COALESCE(NULLIF(pg_catalog.concat_ws(' '::text, COALESCE("ScrubbedTaxon"."acceptedGenus", "ScrubbedTaxon"."acceptedFamily"), "ScrubbedTaxon"."acceptedSpecificEpithet", "ScrubbedTaxon"."morphospeciesSuffix"), ''::text), "ScrubbedTaxon"."acceptedTaxonName"), COALESCE(NULLIF(pg_catalog.concat_ws(' '::text, COALESCE("ScrubbedTaxon"."matchedGenus", "ScrubbedTaxon"."matchedFamily"), "ScrubbedTaxon"."matchedSpecificEpithet", "ScrubbedTaxon"."morphospeciesSuffix"), ''::text), "ScrubbedTaxon"."matchedTaxonName"), "ScrubbedTaxon"."concatenatedScientificName") AS "speciesBinomialWithMorphospecies", "ScrubbedTaxon"."acceptedTaxonName" AS "taxonName", "ScrubbedTaxon"."acceptedScientificNameAuthorship" AS "scientificNameAuthorship", taxonoccurrence.growthform AS "growthForm", plantobservation.reproductivecondition AS "reproductiveCondition", ((threatened_taxonlabel.taxonlabel_id IS NOT NULL))::integer AS threatened_bien, (((cultivated_family_locations.country IS NOT NULL) OR _or(taxonoccurrence.iscultivated, location.iscultivated)))::integer AS cultivated_bien, CASE WHEN (taxonoccurrence.iscultivated IS NOT NULL) THEN taxonoccurrence.cultivatedbasis WHEN (location.iscultivated IS NOT NULL) THEN NULL::text ELSE NULL::text END AS "cultivatedBasis_bien", aggregateoccurrence.notes AS "occurrenceRemarks", _fraction_to_percent(aggregateoccurrence.cover_fraction) AS "coverPercent", _m_to_cm(stemobservation.diameterbreastheight_m) AS "diameterBreastHeight_cm", stemobservation.height_m, stemobservation.tag, stemobservation.xposition_m AS "organismX_m", stemobservation.yposition_m AS "organismY_m", taxonoccurrence.sourceaccessioncode AS "taxonOccurrenceID", taxonoccurrence.authortaxoncode AS "authorTaxonCode", plantobservation.sourceaccessioncode AS "individualObservationID", stemobservation.authorstemcode AS "authorStemCode" FROM ((((((((((((((((((((((((((((source JOIN location USING (source_id)) LEFT JOIN locationevent USING (location_id)) LEFT JOIN location parent_location ON ((parent_location.location_id = location.parent_id))) LEFT JOIN locationplace ON ((locationplace.location_id = COALESCE(parent_location.location_id, location.location_id)))) LEFT JOIN place datasource_place USING (place_id)) LEFT JOIN place canon_place ON ((canon_place.place_id = datasource_place.canon_place_id))) LEFT JOIN coordinates ON ((coordinates.coordinates_id = canon_place.coordinates_id))) LEFT JOIN "newWorld".iso_code_gadm ON ((iso_code_gadm."GADM country" = canon_place.country))) LEFT JOIN "newWorld"."newWorldCountries" ON (("newWorldCountries"."isoCode" = iso_code_gadm."2-digit iso code"))) LEFT JOIN geoscrub.county_centroids ON ((((canon_place.country = 'United States'::text) AND (county_centroids.state = canon_place.stateprovince)) AND (county_centroids.county = canon_place.county)))) LEFT JOIN taxonoccurrence USING (locationevent_id)) LEFT JOIN locationevent parent_event ON ((parent_event.locationevent_id = locationevent.parent_id))) LEFT JOIN project ON ((project.project_id = COALESCE(locationevent.project_id, parent_event.project_id)))) LEFT JOIN method ON ((method.method_id = COALESCE(locationevent.method_id, parent_event.method_id)))) LEFT JOIN party collector ON ((collector.party_id = taxonoccurrence.collector_id))) LEFT JOIN aggregateoccurrence USING (taxonoccurrence_id)) LEFT JOIN plantobservation USING (aggregateoccurrence_id)) LEFT JOIN stemobservation USING (plantobservation_id)) LEFT JOIN specimenreplicate USING (plantobservation_id)) LEFT JOIN sourcelist ON ((sourcelist.sourcelist_id = specimenreplicate.institution_id))) LEFT JOIN taxondetermination ON (((taxondetermination.taxonoccurrence_id = taxonoccurrence.taxonoccurrence_id) AND taxondetermination.is_datasource_current))) LEFT JOIN party identifiedby ON ((identifiedby.party_id = taxondetermination.party_id))) LEFT JOIN taxonverbatim USING (taxonverbatim_id)) LEFT JOIN taxonlabel USING (taxonlabel_id)) LEFT JOIN "TNRS"."ScrubbedTaxon" ON (("ScrubbedTaxon"."concatenatedScientificName" = taxonlabel.taxonomicname))) LEFT JOIN family_higher_plant_group ON ((family_higher_plant_group.family = "ScrubbedTaxon"."acceptedFamily"))) LEFT JOIN cultivated_family_locations ON (((cultivated_family_locations.family = "ScrubbedTaxon"."acceptedFamily") AND (cultivated_family_locations.country = canon_place.country)))) LEFT JOIN threatened_taxonlabel USING (taxonlabel_id)) ORDER BY source.shortname;
2697
    SELECT source.shortname AS datasource, sourcelist.name AS "institutionCode", specimenreplicate.collectioncode_dwc AS "collectionCode", specimenreplicate.catalognumber_dwc AS "catalogNumber", specimenreplicate.sourceaccessioncode AS "occurrenceID", canon_place.country, canon_place.stateprovince AS "stateProvince", datasource_place.county, location.locationnarrative AS locality, CASE WHEN (coordinates.latitude_deg IS NOT NULL) THEN coordinates.latitude_deg ELSE county_centroids.latitude END AS "decimalLatitude", CASE WHEN (coordinates.latitude_deg IS NOT NULL) THEN coordinates.longitude_deg ELSE county_centroids.longitude END AS "decimalLongitude", CASE WHEN (coordinates.latitude_deg IS NOT NULL) THEN coordinates.coordsaccuracy_m ELSE _km_to_m(county_centroids.error_km) END AS "coordinateUncertaintyInMeters", CASE WHEN (coordinates.latitude_deg IS NOT NULL) THEN 'source data'::coordinatesource WHEN (county_centroids.row_num IS NOT NULL) THEN 'georeferencing'::coordinatesource ELSE NULL::coordinatesource END AS "coordinateSource_bien", CASE WHEN (coordinates.latitude_deg IS NOT NULL) THEN NULL::text WHEN (county_centroids.row_num IS NOT NULL) THEN 'county centroid'::text ELSE NULL::text END AS "georeferenceProtocol_bien", (canon_place.geovalid)::integer AS geovalid_bien, ("newWorldCountries"."isNewWorld")::integer AS "isNewWorld_bien", COALESCE(project.sourceaccessioncode, project.projectname) AS "projectID", COALESCE(location.sourceaccessioncode, NULLIF(pg_catalog.concat_ws('; '::text, COALESCE(parent_location.sourceaccessioncode, parent_location.authorlocationcode), location.authorlocationcode), ''::text)) AS "locationID", COALESCE(parent_location.authorlocationcode, location.authorlocationcode) AS "locationName", CASE WHEN (parent_location.location_id IS NOT NULL) THEN location.authorlocationcode ELSE NULL::text END AS subplot, plantobservation.authorplantcode AS "individualCode", COALESCE(location.elevation_m, parent_location.elevation_m) AS "elevationInMeters", _m2_to_ha(COALESCE(location.area_m2, parent_location.area_m2)) AS "plotArea_ha", method.name AS "samplingProtocol", COALESCE(locationevent.temperature_c, parent_event.temperature_c) AS "temperature_C", COALESCE(locationevent.precipitation_m, parent_event.precipitation_m) AS precipitation_m, collector.fullname AS "recordedBy", plantobservation.authorplantcode AS "recordNumber", COALESCE(locationevent.obsstartdate, parent_event.obsstartdate, aggregateoccurrence.collectiondate) AS "dateCollected", taxonverbatim.family AS family_verbatim, COALESCE(taxonverbatim.taxonomicname, NULLIF(pg_catalog.concat_ws(' '::text, taxonverbatim.taxonname, taxonverbatim.author), ''::text), taxonlabel.taxonomicname) AS "scientificName_verbatim", identifiedby.fullname AS "identifiedBy", taxondetermination.determinationdate AS "dateIdentified", taxondetermination.notes AS "identificationRemarks", "ScrubbedTaxon"."matchedFamily" AS family_matched, "ScrubbedTaxon"."matchedTaxonName" AS "taxonName_matched", "ScrubbedTaxon"."matchedScientificNameAuthorship" AS "scientificNameAuthorship_matched", family_higher_plant_group.higher_plant_group AS "higherPlantGroup_bien", "ScrubbedTaxon"."acceptedFamily" AS family, "ScrubbedTaxon"."acceptedGenus" AS genus, COALESCE(COALESCE(NULLIF(pg_catalog.concat_ws(' '::text, COALESCE("ScrubbedTaxon"."acceptedGenus", "ScrubbedTaxon"."acceptedFamily"), "ScrubbedTaxon"."acceptedSpecificEpithet", "ScrubbedTaxon"."morphospeciesSuffix"), ''::text), "ScrubbedTaxon"."acceptedTaxonName"), COALESCE(NULLIF(pg_catalog.concat_ws(' '::text, COALESCE("ScrubbedTaxon"."matchedGenus", "ScrubbedTaxon"."matchedFamily"), "ScrubbedTaxon"."matchedSpecificEpithet", "ScrubbedTaxon"."morphospeciesSuffix"), ''::text), "ScrubbedTaxon"."matchedTaxonName"), "ScrubbedTaxon"."concatenatedScientificName") AS "speciesBinomialWithMorphospecies", "ScrubbedTaxon"."acceptedTaxonName" AS "taxonName", "ScrubbedTaxon"."acceptedScientificNameAuthorship" AS "scientificNameAuthorship", taxonoccurrence.growthform AS "growthForm", plantobservation.reproductivecondition AS "reproductiveCondition", ((threatened_taxonlabel.taxonlabel_id IS NOT NULL))::integer AS threatened_bien, (((cultivated_family_locations.country IS NOT NULL) OR _or(taxonoccurrence.iscultivated, location.iscultivated)))::integer AS cultivated_bien, CASE WHEN (taxonoccurrence.iscultivated IS NOT NULL) THEN taxonoccurrence.cultivatedbasis WHEN (location.iscultivated IS NOT NULL) THEN NULL::text ELSE NULL::text END AS "cultivatedBasis_bien", aggregateoccurrence.notes AS "occurrenceRemarks", _fraction_to_percent(aggregateoccurrence.cover_fraction) AS "coverPercent", _m_to_cm(stemobservation.diameterbreastheight_m) AS "diameterBreastHeight_cm", stemobservation.height_m, stemobservation.tag, stemobservation.xposition_m AS "organismX_m", stemobservation.yposition_m AS "organismY_m", taxonoccurrence.sourceaccessioncode AS "taxonOccurrenceID", taxonoccurrence.authortaxoncode AS "authorTaxonCode", plantobservation.sourceaccessioncode AS "individualObservationID", stemobservation.authorstemcode AS "authorStemCode" FROM ((((((((((((((((((((((((((((source JOIN location USING (source_id)) LEFT JOIN locationevent USING (location_id)) LEFT JOIN location parent_location ON ((parent_location.location_id = location.parent_id))) LEFT JOIN locationplace ON ((locationplace.location_id = COALESCE(parent_location.location_id, location.location_id)))) LEFT JOIN place datasource_place USING (place_id)) LEFT JOIN place canon_place ON ((canon_place.place_id = datasource_place.canon_place_id))) LEFT JOIN coordinates ON ((coordinates.coordinates_id = canon_place.coordinates_id))) LEFT JOIN "newWorld".iso_code_gadm ON ((iso_code_gadm."*GADM country" = canon_place.country))) LEFT JOIN "newWorld"."newWorldCountries" ON (("newWorldCountries"."*isoCode" = iso_code_gadm."*2-digit iso code"))) LEFT JOIN geoscrub.county_centroids ON ((((canon_place.country = 'United States'::text) AND (county_centroids.state = canon_place.stateprovince)) AND (county_centroids.county = canon_place.county)))) LEFT JOIN taxonoccurrence USING (locationevent_id)) LEFT JOIN locationevent parent_event ON ((parent_event.locationevent_id = locationevent.parent_id))) LEFT JOIN project ON ((project.project_id = COALESCE(locationevent.project_id, parent_event.project_id)))) LEFT JOIN method ON ((method.method_id = COALESCE(locationevent.method_id, parent_event.method_id)))) LEFT JOIN party collector ON ((collector.party_id = taxonoccurrence.collector_id))) LEFT JOIN aggregateoccurrence USING (taxonoccurrence_id)) LEFT JOIN plantobservation USING (aggregateoccurrence_id)) LEFT JOIN stemobservation USING (plantobservation_id)) LEFT JOIN specimenreplicate USING (plantobservation_id)) LEFT JOIN sourcelist ON ((sourcelist.sourcelist_id = specimenreplicate.institution_id))) LEFT JOIN taxondetermination ON (((taxondetermination.taxonoccurrence_id = taxonoccurrence.taxonoccurrence_id) AND taxondetermination.is_datasource_current))) LEFT JOIN party identifiedby ON ((identifiedby.party_id = taxondetermination.party_id))) LEFT JOIN taxonverbatim USING (taxonverbatim_id)) LEFT JOIN taxonlabel USING (taxonlabel_id)) LEFT JOIN "TNRS"."ScrubbedTaxon" ON (("ScrubbedTaxon"."concatenatedScientificName" = taxonlabel.taxonomicname))) LEFT JOIN family_higher_plant_group ON ((family_higher_plant_group.family = "ScrubbedTaxon"."acceptedFamily"))) LEFT JOIN cultivated_family_locations ON (((cultivated_family_locations.family = "ScrubbedTaxon"."acceptedFamily") AND (cultivated_family_locations.country = canon_place.country)))) LEFT JOIN threatened_taxonlabel USING (taxonlabel_id)) ORDER BY source.shortname;
2698 2698

  
2699 2699

  
2700 2700
ALTER TABLE "public.test_taxonomic_names".analytical_stem_view OWNER TO bien;
......
3351 3351
--
3352 3352

  
3353 3353
CREATE VIEW geoscrub_input_new AS
3354
    SELECT geoscrub_input.country, geoscrub_input."stateProvince", geoscrub_input.county, geoscrub_input."decimalLatitude", geoscrub_input."decimalLongitude" FROM (geoscrub_input LEFT JOIN geoscrub.geoscrub_output ON ((((((geoscrub_output.decimallatitude = geoscrub_input."decimalLatitude") AND (geoscrub_output.decimallongitude = geoscrub_input."decimalLongitude")) AND (geoscrub_output.country = geoscrub_input.country)) AND (geoscrub_output.stateprovince = geoscrub_input."stateProvince")) AND (geoscrub_output.county = geoscrub_input.county)))) WHERE (geoscrub_output.row_num IS NULL);
3354
    SELECT geoscrub_input.country, geoscrub_input."stateProvince", geoscrub_input.county, geoscrub_input."decimalLatitude", geoscrub_input."decimalLongitude" FROM (geoscrub_input LEFT JOIN geoscrub.geoscrub_output ON ((((((geoscrub_output."decimalLatitude" = geoscrub_input."decimalLatitude") AND (geoscrub_output."decimalLongitude" = geoscrub_input."decimalLongitude")) AND (geoscrub_output.country = geoscrub_input.country)) AND (geoscrub_output."stateProvince" = geoscrub_input."stateProvince")) AND (geoscrub_output.county = geoscrub_input.county)))) WHERE (geoscrub_output."*row_num" IS NULL);
3355 3355

  
3356 3356

  
3357 3357
ALTER TABLE "public.test_taxonomic_names".geoscrub_input_new OWNER TO bien;
......
4353 4353
-- Name: source_source_id_seq; Type: SEQUENCE SET; Schema: public.test_taxonomic_names; Owner: bien
4354 4354
--
4355 4355

  
4356
SELECT pg_catalog.setval('source_source_id_seq', 75, true);
4356
SELECT pg_catalog.setval('source_source_id_seq', 77, true);
4357 4357

  
4358 4358

  
4359 4359
--
......
5993 5993
--
5994 5994

  
5995 5995
COPY source (source_id, matched_source_id, parent_id, shortname, citation, sourcetype, accesslevel, accessconditions, observationtype, title, titlesuperior, volume, issue, pagerange, totalpages, publisher, publicationplace, isbn, edition, numberofvolumes, chapternumber, reportnumber, communicationtype, degree, url, doi, additionalinfo, pubdate, accessdate, conferencedate) FROM stdin;
5996
1	\N	\N	test_taxonomic_names	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N
5996
1	\N	\N	TNRS	\N	aggregator	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N
5997
2	\N	\N	test_taxonomic_names	\N	personal communication	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N
5997 5998
\.
5998 5999

  
5999 6000

  
......
6098 6099
--
6099 6100

  
6100 6101
COPY taxonlabel (taxonlabel_id, source_id, sourceaccessioncode, taxonstatus, canon_label_id, matched_label_id, parent_id, taxonepithet, rank, taxonomicname) FROM stdin;
6101
2	1	1	\N	2	\N	\N	\N	\N	Poa annua
6102
4	1	2	\N	4	\N	\N	\N	\N	Poa annua L.
6103
6	1	3	\N	6	\N	\N	\N	\N	Poa annua var. eriolepis
6104
8	1	4	\N	8	\N	\N	\N	\N	Poa annua subsp. exilis
6105
10	1	5	\N	10	\N	\N	\N	\N	Poa annua ssp. exilis
6106
12	1	6	\N	12	\N	\N	\N	\N	Poa annua subvar. minima
6107
14	1	7	\N	14	\N	\N	\N	\N	Poa annua fo. lanuginosa
6108
16	1	8	\N	16	\N	\N	\N	\N	Silene scouleri subsp. pringlei var. grisea C.L. Hitchc. & Maguire
6109
18	1	9	\N	18	\N	\N	\N	\N	Silene scouleri Hook. subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire var. grisea C.L. Hitchc. & Maguire
6110
20	1	10	\N	20	\N	\N	\N	\N	Fabaceae Inga sp.3
6111
22	1	11	\N	22	\N	\N	\N	\N	Fabaceae Inga "fuzzy leaf"
6112
24	1	12	\N	24	\N	\N	\N	\N	Fabaceae unknown #2
6113
26	1	13	\N	26	\N	\N	\N	\N	Fabaceae Boyle#6500
6114
28	1	14	\N	28	\N	\N	\N	\N	Fam_indet. Boyle#6501
6115
30	1	15	\N	30	\N	\N	\N	\N	Compositae indet. sp.1
6102
2	2	1	\N	2	\N	\N	\N	\N	Poa annua
6103
4	2	2	\N	4	\N	\N	\N	\N	Poa annua L.
6104
6	2	3	\N	6	\N	\N	\N	\N	Poa annua var. eriolepis
6105
8	2	4	\N	8	\N	\N	\N	\N	Poa annua subsp. exilis
6106
10	2	5	\N	10	\N	\N	\N	\N	Poa annua ssp. exilis
6107
12	2	6	\N	12	\N	\N	\N	\N	Poa annua subvar. minima
6108
14	2	7	\N	14	\N	\N	\N	\N	Poa annua fo. lanuginosa
6109
16	2	8	\N	16	\N	\N	\N	\N	Silene scouleri subsp. pringlei var. grisea C.L. Hitchc. & Maguire
6110
18	2	9	\N	18	\N	\N	\N	\N	Silene scouleri Hook. subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire var. grisea C.L. Hitchc. & Maguire
6111
20	2	10	\N	20	\N	\N	\N	\N	Fabaceae Inga sp.3
6112
22	2	11	\N	22	\N	\N	\N	\N	Fabaceae Inga "fuzzy leaf"
6113
24	2	12	\N	24	\N	\N	\N	\N	Fabaceae unknown #2
6114
26	2	13	\N	26	\N	\N	\N	\N	Fabaceae Boyle#6500
6115
28	2	14	\N	28	\N	\N	\N	\N	Fam_indet. Boyle#6501
6116
30	2	15	\N	30	\N	\N	\N	\N	Compositae indet. sp.1
6116 6117
\.
6117 6118

  
6118 6119

  
......
6168 6169
--
6169 6170

  
6170 6171
COPY taxonverbatim (taxonverbatim_id, source_id, taxonlabel_id, verbatimrank, taxonomicname, taxonname, author, family, genus, specific_epithet, morphospecies, morphoname, growthform, description) FROM stdin;
6171
2	1	2	\N	\N	Poa annua	\N	\N	\N	\N	\N	\N	\N	\N
6172
4	1	4	\N	\N	Poa annua L.	\N	\N	\N	\N	\N	\N	\N	\N
6173
6	1	6	\N	\N	Poa annua var. eriolepis	\N	\N	\N	\N	\N	\N	\N	\N
6174
8	1	8	\N	\N	Poa annua subsp. exilis	\N	\N	\N	\N	\N	\N	\N	\N
6175
10	1	10	\N	\N	Poa annua ssp. exilis	\N	\N	\N	\N	\N	\N	\N	\N
6176
12	1	12	\N	\N	Poa annua subvar. minima	\N	\N	\N	\N	\N	\N	\N	\N
6177
14	1	14	\N	\N	Poa annua fo. lanuginosa	\N	\N	\N	\N	\N	\N	\N	\N
6178
16	1	16	\N	\N	Silene scouleri subsp. pringlei var. grisea C.L. Hitchc. & Maguire	\N	\N	\N	\N	\N	\N	\N	\N
6179
18	1	18	\N	\N	Silene scouleri Hook. subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire var. grisea C.L. Hitchc. & Maguire	\N	\N	\N	\N	\N	\N	\N	\N
6180
20	1	20	\N	\N	Fabaceae Inga sp.3	\N	\N	\N	\N	\N	\N	\N	\N
6181
22	1	22	\N	\N	Fabaceae Inga "fuzzy leaf"	\N	\N	\N	\N	\N	\N	\N	\N
6182
24	1	24	\N	\N	Fabaceae unknown #2	\N	\N	\N	\N	\N	\N	\N	\N
6183
26	1	26	\N	\N	Fabaceae Boyle#6500	\N	\N	\N	\N	\N	\N	\N	\N
6184
28	1	28	\N	\N	Fam_indet. Boyle#6501	\N	\N	\N	\N	\N	\N	\N	\N
6185
30	1	30	\N	\N	Compositae indet. sp.1	\N	\N	\N	\N	\N	\N	\N	\N
6172
2	2	2	\N	\N	Poa annua	\N	\N	\N	\N	\N	\N	\N	\N
6173
4	2	4	\N	\N	Poa annua L.	\N	\N	\N	\N	\N	\N	\N	\N
6174
6	2	6	\N	\N	Poa annua var. eriolepis	\N	\N	\N	\N	\N	\N	\N	\N
6175
8	2	8	\N	\N	Poa annua subsp. exilis	\N	\N	\N	\N	\N	\N	\N	\N
6176
10	2	10	\N	\N	Poa annua ssp. exilis	\N	\N	\N	\N	\N	\N	\N	\N
6177
12	2	12	\N	\N	Poa annua subvar. minima	\N	\N	\N	\N	\N	\N	\N	\N
6178
14	2	14	\N	\N	Poa annua fo. lanuginosa	\N	\N	\N	\N	\N	\N	\N	\N
6179
16	2	16	\N	\N	Silene scouleri subsp. pringlei var. grisea C.L. Hitchc. & Maguire	\N	\N	\N	\N	\N	\N	\N	\N
6180
18	2	18	\N	\N	Silene scouleri Hook. subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire var. grisea C.L. Hitchc. & Maguire	\N	\N	\N	\N	\N	\N	\N	\N
6181
20	2	20	\N	\N	Fabaceae Inga sp.3	\N	\N	\N	\N	\N	\N	\N	\N
6182
22	2	22	\N	\N	Fabaceae Inga "fuzzy leaf"	\N	\N	\N	\N	\N	\N	\N	\N
6183
24	2	24	\N	\N	Fabaceae unknown #2	\N	\N	\N	\N	\N	\N	\N	\N
6184
26	2	26	\N	\N	Fabaceae Boyle#6500	\N	\N	\N	\N	\N	\N	\N	\N
6185
28	2	28	\N	\N	Fam_indet. Boyle#6501	\N	\N	\N	\N	\N	\N	\N	\N
6186
30	2	30	\N	\N	Compositae indet. sp.1	\N	\N	\N	\N	\N	\N	\N	\N
6186 6187
\.
6187 6188

  
6188 6189

  

Also available in: Unified diff