Project

General

Profile

« Previous | Next » 

Revision 13853

inputs/.TNRS/data.sql: refreshed

View differences:

trunk/inputs/test_taxonomic_names/_scrub/TNRS.sql
31 31
$ svn di
32 32
# make the changes shown in the diff
33 33
## to change column types:
34
SELECT util.set_col_types(''"TNRS".tnrs'', ARRAY[
34
SELECT util.set_col_types(''"TNRS".tnrs_match'', ARRAY[
35 35
  (''col'', ''new_type'')
36 36
]::util.col_cast[]); -- runtime: 9 min ("531282 ms")
37 37
$ rm=1 inputs/.TNRS/schema.sql.run
......
44 44
SET search_path = "TNRS", pg_catalog;
45 45

  
46 46
--
47
-- Name: MatchedTaxon_modify(text); Type: FUNCTION; Schema: TNRS; Owner: bien
48
--
49

  
50
CREATE FUNCTION "MatchedTaxon_modify"(view_query text) RETURNS void
51
    LANGUAGE sql
52
    AS $_$
53
SELECT util.recreate_view('"TNRS"."MatchedTaxon"', $1, $$
54
-- **IMPORTANT**: keep these updated as described in the views' comments
55

  
56
CREATE VIEW "TNRS"."ValidMatchedTaxon" AS 
57
 SELECT *
58
   FROM "TNRS"."MatchedTaxon"
59
  WHERE "MatchedTaxon".taxon_scrub__is_valid_match;
60
$$||util.mk_set_relation_metadata('"TNRS"."ValidMatchedTaxon"')||$$
61

  
62
CREATE VIEW "TNRS".taxon_scrub AS 
63
 SELECT *
64
   FROM "TNRS"."ValidMatchedTaxon"
65
   LEFT JOIN "TNRS"."taxon_scrub.scrubbed_unique_taxon_name.*" USING (scrubbed_unique_taxon_name);
66
$$||util.mk_set_relation_metadata('"TNRS".taxon_scrub')||$$
67
$$);
68
$_$;
69

  
70

  
71
ALTER FUNCTION "TNRS"."MatchedTaxon_modify"(view_query text) OWNER TO bien;
72

  
73
--
74
-- Name: FUNCTION "MatchedTaxon_modify"(view_query text); Type: COMMENT; Schema: TNRS; Owner: bien
75
--
76

  
77
COMMENT ON FUNCTION "MatchedTaxon_modify"(view_query text) IS '
78
usage:
79
SELECT "TNRS"."MatchedTaxon_modify"($$
80
 SELECT *, __ AS accepted_morphospecies_binomial
81
   FROM __
82
$$);
83

  
84
idempotent
85
';
86

  
87

  
88
--
89 47
-- Name: batch__fill(); Type: FUNCTION; Schema: TNRS; Owner: bien
90 48
--
91 49

  
......
145 103
ALTER FUNCTION "TNRS".map_taxonomic_status(taxonomic_status_verbatim text, accepted_taxon_name_no_author text) OWNER TO bien;
146 104

  
147 105
--
148
-- Name: taxon_scrub_modify(text); Type: FUNCTION; Schema: TNRS; Owner: bien
106
-- Name: taxon_name_is_safe(text); Type: FUNCTION; Schema: TNRS; Owner: bien
149 107
--
150 108

  
151
CREATE FUNCTION taxon_scrub_modify(view_query text) RETURNS void
152
    LANGUAGE sql
109
CREATE FUNCTION taxon_name_is_safe(taxon_name text) RETURNS boolean
110
    LANGUAGE sql IMMUTABLE
153 111
    AS $_$
154
SELECT util.recreate_view('"TNRS".taxon_scrub', $1);
112
SELECT NOT ($1 = ANY("TNRS".unsafe_taxon_names()))
155 113
$_$;
156 114

  
157 115

  
158
ALTER FUNCTION "TNRS".taxon_scrub_modify(view_query text) OWNER TO bien;
116
ALTER FUNCTION "TNRS".taxon_name_is_safe(taxon_name text) OWNER TO bien;
159 117

  
160 118
--
161
-- Name: FUNCTION taxon_scrub_modify(view_query text); Type: COMMENT; Schema: TNRS; Owner: bien
162
--
163

  
164
COMMENT ON FUNCTION taxon_scrub_modify(view_query text) IS '
165
usage:
166
SELECT "TNRS".taxon_scrub_modify($$
167
 SELECT *, __ AS scrubbed_morphospecies_binomial
168
   FROM "TNRS"."ValidMatchedTaxon"
169
   LEFT JOIN "TNRS"."taxon_scrub.scrubbed_unique_taxon_name.*" USING (scrubbed_unique_taxon_name);
170
$$);
171

  
172
idempotent
173
';
174

  
175

  
176
--
177 119
-- Name: tnrs__batch_begin(); Type: FUNCTION; Schema: TNRS; Owner: bien
178 120
--
179 121

  
......
290 232

  
291 233
COMMENT ON FUNCTION tnrs_populate_fields() IS '
292 234
IMPORTANT: when changing this function, you must regenerate the derived cols:
293
UPDATE "TNRS".tnrs SET "Name_submitted" = "Name_submitted"
235
UPDATE "TNRS".tnrs_match SET "Name_submitted" = "Name_submitted"
294 236
runtime: 30 min ("5564082 rows affected, 1918900 ms execution time")
295
VACUUM ANALYZE "TNRS".tnrs -- to remove previous rows
237
VACUUM ANALYZE "TNRS".tnrs_match -- to remove previous rows
296 238
runtime: 1.5 min ("92633 ms")
297 239
';
298 240

  
299 241

  
242
--
243
-- Name: unsafe_taxon_names(); Type: FUNCTION; Schema: TNRS; Owner: bien
244
--
245

  
246
CREATE FUNCTION unsafe_taxon_names() RETURNS text[]
247
    LANGUAGE sql IMMUTABLE
248
    AS $$
249
SELECT ARRAY[
250
]::text[]
251
$$;
252

  
253

  
254
ALTER FUNCTION "TNRS".unsafe_taxon_names() OWNER TO bien;
255

  
300 256
SET default_tablespace = '';
301 257

  
302 258
SET default_with_oids = false;
303 259

  
304 260
--
305
-- Name: tnrs; Type: TABLE; Schema: TNRS; Owner: bien; Tablespace: 
261
-- Name: tnrs_match; Type: TABLE; Schema: TNRS; Owner: bien; Tablespace: 
306 262
--
307 263

  
308
CREATE TABLE tnrs (
264
CREATE TABLE tnrs_match (
309 265
    batch text DEFAULT now() NOT NULL,
310 266
    match_num integer NOT NULL,
311 267
    "Name_number" integer NOT NULL,
......
349 305
);
350 306

  
351 307

  
352
ALTER TABLE "TNRS".tnrs OWNER TO bien;
308
ALTER TABLE "TNRS".tnrs_match OWNER TO bien;
353 309

  
354 310
--
355
-- Name: TABLE tnrs; Type: COMMENT; Schema: TNRS; Owner: bien
311
-- Name: TABLE tnrs_match; Type: COMMENT; Schema: TNRS; Owner: bien
356 312
--
357 313

  
358
COMMENT ON TABLE tnrs IS '
314
COMMENT ON TABLE tnrs_match IS '
359 315
to remove columns or add columns at the end:
360 316
$ rm=1 inputs/.TNRS/data.sql.run
361 317
$ make schemas/remake
......
366 322
$ make schemas/remake
367 323

  
368 324
to populate a new column:
369
ALTER TABLE "TNRS".tnrs DISABLE TRIGGER tnrs_populate_fields; --speeds up update
370
UPDATE "TNRS".tnrs SET "col" = value;
325
ALTER TABLE "TNRS".tnrs_match DISABLE TRIGGER tnrs_populate_fields; --speeds up update
326
UPDATE "TNRS".tnrs_match SET "col" = value;
371 327
	-- runtime: 30 min ("5564201 rows affected, 1624829 ms execution time")
372
ALTER TABLE "TNRS".tnrs ENABLE TRIGGER tnrs_populate_fields;
373
VACUUM ANALYZE "TNRS".tnrs --remove previous rows; runtime: 1.5 min ("92633 ms")
328
ALTER TABLE "TNRS".tnrs_match ENABLE TRIGGER tnrs_populate_fields;
329
VACUUM ANALYZE "TNRS".tnrs_match --remove previous rows; runtime: 1.5 min ("92633 ms")
374 330

  
375 331
to add a constraint: runtime: 3 min ("173620 ms")
376 332
';
......
381 337
--
382 338

  
383 339
CREATE VIEW "MatchedTaxon" AS
384
 SELECT s."*Name_matched.batch", 
385
    s."concatenatedScientificName", 
386
    s."matchedTaxonName", 
387
    s."matchedTaxonRank", 
388
    s."*Name_matched.Name_score", 
389
    s."matchedScientificNameAuthorship", 
390
    s."matchedScientificNameID", 
391
    s."*Name_matched.Author_score", 
392
    s."matchedFamilyConfidence_fraction", 
393
    s."matchedFamily", 
394
    s."matchedGenus", 
395
    s."matchedGenusConfidence_fraction", 
396
    s."matchedSpecificEpithet", 
397
    s."matchedSpeciesConfidence_fraction", 
398
    s."matchedInfraspecificEpithet", 
399
    s."*Name_matched.Infraspecific_epithet_score", 
400
    s."identificationQualifier", 
401
    s."morphospeciesSuffix", 
402
    s."taxonomicStatus", 
403
    s.accepted_taxon_name_no_author, 
404
    s.accepted_author, 
405
    s.accepted_taxon_rank, 
406
    s."acceptedScientificNameID", 
407
    s.accepted_species_binomial, 
408
    s.accepted_family, 
409
    s."*Name_matched.Selected", 
410
    s."*Name_matched.Source", 
411
    s."*Name_matched.Warnings", 
412
    s."*Name_matched.Accepted_name_lsid", 
413
    s.taxon_scrub__is_valid_match, 
414
    s.scrubbed_unique_taxon_name, 
340
 SELECT s."*Name_matched.batch",
341
    s."concatenatedScientificName",
342
    s."matchedTaxonName",
343
    s."matchedTaxonRank",
344
    s."*Name_matched.Name_score",
345
    s."matchedScientificNameAuthorship",
346
    s."matchedScientificNameID",
347
    s."*Name_matched.Author_score",
348
    s."matchedFamilyConfidence_fraction",
349
    s."matchedFamily",
350
    s."matchedGenus",
351
    s."matchedGenusConfidence_fraction",
352
    s."matchedSpecificEpithet",
353
    s."matchedSpeciesConfidence_fraction",
354
    s."matchedInfraspecificEpithet",
355
    s."*Name_matched.Infraspecific_epithet_score",
356
    s."identificationQualifier",
357
    s."morphospeciesSuffix",
358
    s."taxonomicStatus",
359
    s.accepted_taxon_name_no_author,
360
    s.accepted_author,
361
    s.accepted_taxon_rank,
362
    s."acceptedScientificNameID",
363
    s.accepted_species_binomial,
364
    s.accepted_family,
365
    s."*Name_matched.Selected",
366
    s."*Name_matched.Source",
367
    s."*Name_matched.Warnings",
368
    s."*Name_matched.Accepted_name_lsid",
369
    s.taxon_scrub__is_valid_match,
370
    s.scrubbed_unique_taxon_name,
415 371
        CASE
416 372
            WHEN (s.accepted_taxon_rank = 'family'::text) THEN concat_ws(' '::text, s.accepted_family, s."morphospeciesSuffix")
417 373
            WHEN (s.accepted_taxon_rank = 'genus'::text) THEN concat_ws(' '::text, s.accepted_taxon_name_no_author, s."morphospeciesSuffix")
418 374
            ELSE s.accepted_species_binomial
419 375
        END AS accepted_morphospecies_binomial
420
   FROM ( SELECT tnrs.batch AS "*Name_matched.batch", 
421
            tnrs."Name_submitted" AS "concatenatedScientificName", 
422
            tnrs."Name_matched" AS "matchedTaxonName", 
423
            tnrs."Name_matched_rank" AS "matchedTaxonRank", 
424
            tnrs."Name_score" AS "*Name_matched.Name_score", 
425
            tnrs."Name_matched_author" AS "matchedScientificNameAuthorship", 
426
            tnrs."Name_matched_url" AS "matchedScientificNameID", 
427
            tnrs."Author_score" AS "*Name_matched.Author_score", 
428
            tnrs."Family_score" AS "matchedFamilyConfidence_fraction", 
429
            COALESCE(tnrs."Name_matched_accepted_family", tnrs."Accepted_name_family") AS "matchedFamily", 
430
            tnrs."Genus_matched" AS "matchedGenus", 
431
            tnrs."Genus_score" AS "matchedGenusConfidence_fraction", 
432
            tnrs."Specific_epithet_matched" AS "matchedSpecificEpithet", 
433
            tnrs."Specific_epithet_score" AS "matchedSpeciesConfidence_fraction", 
434
            tnrs."Infraspecific_epithet_matched" AS "matchedInfraspecificEpithet", 
435
            tnrs."Infraspecific_epithet_score" AS "*Name_matched.Infraspecific_epithet_score", 
436
            tnrs."Annotations" AS "identificationQualifier", 
437
            tnrs."Unmatched_terms" AS "morphospeciesSuffix", 
438
            map_taxonomic_status(tnrs."Taxonomic_status", tnrs."Accepted_name") AS "taxonomicStatus", 
439
            tnrs."Accepted_name" AS accepted_taxon_name_no_author, 
440
            tnrs."Accepted_name_author" AS accepted_author, 
441
            tnrs."Accepted_name_rank" AS accepted_taxon_rank, 
442
            tnrs."Accepted_name_url" AS "acceptedScientificNameID", 
443
            tnrs."Accepted_name_species" AS accepted_species_binomial, 
444
            tnrs."Accepted_name_family" AS accepted_family, 
445
            tnrs."Selected" AS "*Name_matched.Selected", 
446
            tnrs."Source" AS "*Name_matched.Source", 
447
            tnrs."Warnings" AS "*Name_matched.Warnings", 
448
            tnrs."Accepted_name_lsid" AS "*Name_matched.Accepted_name_lsid", 
449
            tnrs.is_valid_match AS taxon_scrub__is_valid_match, 
450
            tnrs.scrubbed_unique_taxon_name
451
           FROM tnrs) s;
376
   FROM ( SELECT tnrs_match.batch AS "*Name_matched.batch",
377
            tnrs_match."Name_submitted" AS "concatenatedScientificName",
378
            tnrs_match."Name_matched" AS "matchedTaxonName",
379
            tnrs_match."Name_matched_rank" AS "matchedTaxonRank",
380
            tnrs_match."Name_score" AS "*Name_matched.Name_score",
381
            tnrs_match."Name_matched_author" AS "matchedScientificNameAuthorship",
382
            tnrs_match."Name_matched_url" AS "matchedScientificNameID",
383
            tnrs_match."Author_score" AS "*Name_matched.Author_score",
384
            tnrs_match."Family_score" AS "matchedFamilyConfidence_fraction",
385
            COALESCE(tnrs_match."Name_matched_accepted_family", tnrs_match."Accepted_name_family") AS "matchedFamily",
386
            tnrs_match."Genus_matched" AS "matchedGenus",
387
            tnrs_match."Genus_score" AS "matchedGenusConfidence_fraction",
388
            tnrs_match."Specific_epithet_matched" AS "matchedSpecificEpithet",
389
            tnrs_match."Specific_epithet_score" AS "matchedSpeciesConfidence_fraction",
390
            tnrs_match."Infraspecific_epithet_matched" AS "matchedInfraspecificEpithet",
391
            tnrs_match."Infraspecific_epithet_score" AS "*Name_matched.Infraspecific_epithet_score",
392
            tnrs_match."Annotations" AS "identificationQualifier",
393
            tnrs_match."Unmatched_terms" AS "morphospeciesSuffix",
394
            map_taxonomic_status(tnrs_match."Taxonomic_status", tnrs_match."Accepted_name") AS "taxonomicStatus",
395
            tnrs_match."Accepted_name" AS accepted_taxon_name_no_author,
396
            tnrs_match."Accepted_name_author" AS accepted_author,
397
            tnrs_match."Accepted_name_rank" AS accepted_taxon_rank,
398
            tnrs_match."Accepted_name_url" AS "acceptedScientificNameID",
399
            tnrs_match."Accepted_name_species" AS accepted_species_binomial,
400
            tnrs_match."Accepted_name_family" AS accepted_family,
401
            tnrs_match."Selected" AS "*Name_matched.Selected",
402
            tnrs_match."Source" AS "*Name_matched.Source",
403
            tnrs_match."Warnings" AS "*Name_matched.Warnings",
404
            tnrs_match."Accepted_name_lsid" AS "*Name_matched.Accepted_name_lsid",
405
            tnrs_match.is_valid_match AS taxon_scrub__is_valid_match,
406
            tnrs_match.scrubbed_unique_taxon_name
407
           FROM tnrs_match) s;
452 408

  
453 409

  
454 410
ALTER TABLE "TNRS"."MatchedTaxon" OWNER TO bien;
......
459 415

  
460 416
COMMENT ON VIEW "MatchedTaxon" IS '
461 417
to modify:
462
SELECT "TNRS"."MatchedTaxon_modify"($$
463
 SELECT *, __ AS accepted_morphospecies_binomial
464
   FROM __
418
SELECT util.recreate_view(''"TNRS"."MatchedTaxon"'', $$
419
SELECT __
465 420
$$);
466 421
';
467 422

  
......
503 458
--
504 459

  
505 460
CREATE VIEW "ValidMatchedTaxon" AS
506
 SELECT "MatchedTaxon"."*Name_matched.batch", 
507
    "MatchedTaxon"."concatenatedScientificName", 
508
    "MatchedTaxon"."matchedTaxonName", 
509
    "MatchedTaxon"."matchedTaxonRank", 
510
    "MatchedTaxon"."*Name_matched.Name_score", 
511
    "MatchedTaxon"."matchedScientificNameAuthorship", 
512
    "MatchedTaxon"."matchedScientificNameID", 
513
    "MatchedTaxon"."*Name_matched.Author_score", 
514
    "MatchedTaxon"."matchedFamilyConfidence_fraction", 
515
    "MatchedTaxon"."matchedFamily", 
516
    "MatchedTaxon"."matchedGenus", 
517
    "MatchedTaxon"."matchedGenusConfidence_fraction", 
518
    "MatchedTaxon"."matchedSpecificEpithet", 
519
    "MatchedTaxon"."matchedSpeciesConfidence_fraction", 
520
    "MatchedTaxon"."matchedInfraspecificEpithet", 
521
    "MatchedTaxon"."*Name_matched.Infraspecific_epithet_score", 
522
    "MatchedTaxon"."identificationQualifier", 
523
    "MatchedTaxon"."morphospeciesSuffix", 
524
    "MatchedTaxon"."taxonomicStatus", 
525
    "MatchedTaxon".accepted_taxon_name_no_author, 
526
    "MatchedTaxon".accepted_author, 
527
    "MatchedTaxon".accepted_taxon_rank, 
528
    "MatchedTaxon"."acceptedScientificNameID", 
529
    "MatchedTaxon".accepted_species_binomial, 
530
    "MatchedTaxon".accepted_family, 
531
    "MatchedTaxon"."*Name_matched.Selected", 
532
    "MatchedTaxon"."*Name_matched.Source", 
533
    "MatchedTaxon"."*Name_matched.Warnings", 
534
    "MatchedTaxon"."*Name_matched.Accepted_name_lsid", 
535
    "MatchedTaxon".taxon_scrub__is_valid_match, 
536
    "MatchedTaxon".scrubbed_unique_taxon_name, 
461
 SELECT "MatchedTaxon"."*Name_matched.batch",
462
    "MatchedTaxon"."concatenatedScientificName",
463
    "MatchedTaxon"."matchedTaxonName",
464
    "MatchedTaxon"."matchedTaxonRank",
465
    "MatchedTaxon"."*Name_matched.Name_score",
466
    "MatchedTaxon"."matchedScientificNameAuthorship",
467
    "MatchedTaxon"."matchedScientificNameID",
468
    "MatchedTaxon"."*Name_matched.Author_score",
469
    "MatchedTaxon"."matchedFamilyConfidence_fraction",
470
    "MatchedTaxon"."matchedFamily",
471
    "MatchedTaxon"."matchedGenus",
472
    "MatchedTaxon"."matchedGenusConfidence_fraction",
473
    "MatchedTaxon"."matchedSpecificEpithet",
474
    "MatchedTaxon"."matchedSpeciesConfidence_fraction",
475
    "MatchedTaxon"."matchedInfraspecificEpithet",
476
    "MatchedTaxon"."*Name_matched.Infraspecific_epithet_score",
477
    "MatchedTaxon"."identificationQualifier",
478
    "MatchedTaxon"."morphospeciesSuffix",
479
    "MatchedTaxon"."taxonomicStatus",
480
    "MatchedTaxon".accepted_taxon_name_no_author,
481
    "MatchedTaxon".accepted_author,
482
    "MatchedTaxon".accepted_taxon_rank,
483
    "MatchedTaxon"."acceptedScientificNameID",
484
    "MatchedTaxon".accepted_species_binomial,
485
    "MatchedTaxon".accepted_family,
486
    "MatchedTaxon"."*Name_matched.Selected",
487
    "MatchedTaxon"."*Name_matched.Source",
488
    "MatchedTaxon"."*Name_matched.Warnings",
489
    "MatchedTaxon"."*Name_matched.Accepted_name_lsid",
490
    "MatchedTaxon".taxon_scrub__is_valid_match,
491
    "MatchedTaxon".scrubbed_unique_taxon_name,
537 492
    "MatchedTaxon".accepted_morphospecies_binomial
538 493
   FROM "MatchedTaxon"
539 494
  WHERE "MatchedTaxon".taxon_scrub__is_valid_match;
......
652 607
--
653 608

  
654 609
CREATE VIEW "taxon_scrub.scrubbed_unique_taxon_name.*" AS
655
 SELECT tnrs."Name_submitted" AS scrubbed_unique_taxon_name, 
656
    tnrs."Name_matched_rank" AS scrubbed_taxon_rank, 
657
    COALESCE(tnrs."Name_matched_accepted_family", tnrs."Family_matched") AS scrubbed_family, 
658
    tnrs."Genus_matched" AS scrubbed_genus, 
659
    tnrs."Specific_epithet_matched" AS scrubbed_specific_epithet, 
660
    tnrs."Infraspecific_rank" AS scrubbed_infraspecific_rank, 
661
    tnrs."Infraspecific_epithet_matched" AS scrubbed_infraspecific_epithet, 
662
    tnrs."Name_matched_author" AS scrubbed_author, 
663
    tnrs."Name_matched" AS scrubbed_taxon_name_no_author, 
664
    (tnrs."Name_matched" || COALESCE((' '::text || tnrs."Name_matched_author"), ''::text)) AS scrubbed_taxon_name_with_author
665
   FROM tnrs;
610
 SELECT tnrs_match."Name_submitted" AS scrubbed_unique_taxon_name,
611
    tnrs_match."Name_matched_rank" AS scrubbed_taxon_rank,
612
    COALESCE(tnrs_match."Name_matched_accepted_family", tnrs_match."Family_matched") AS scrubbed_family,
613
    tnrs_match."Genus_matched" AS scrubbed_genus,
614
    tnrs_match."Specific_epithet_matched" AS scrubbed_specific_epithet,
615
    tnrs_match."Infraspecific_rank" AS scrubbed_infraspecific_rank,
616
    tnrs_match."Infraspecific_epithet_matched" AS scrubbed_infraspecific_epithet,
617
    tnrs_match."Name_matched_author" AS scrubbed_author,
618
    tnrs_match."Name_matched" AS scrubbed_taxon_name_no_author,
619
    (tnrs_match."Name_matched" || COALESCE((' '::text || tnrs_match."Name_matched_author"), ''::text)) AS scrubbed_taxon_name_with_author
620
   FROM tnrs_match;
666 621

  
667 622

  
668 623
ALTER TABLE "TNRS"."taxon_scrub.scrubbed_unique_taxon_name.*" OWNER TO bien;
......
672 627
--
673 628

  
674 629
COMMENT ON VIEW "taxon_scrub.scrubbed_unique_taxon_name.*" IS '
630
to modify:
631
SELECT util.recreate_view(''"TNRS"."taxon_scrub.scrubbed_unique_taxon_name.*"'', $$
632
SELECT __
633
$$);
634

  
675 635
scrubbed_family: Name_matched_accepted_family was missing from the TNRS results at one point, so Family_matched is used as a workaround to populate this. the workaround is for *accepted names only*, as no opinion names do not have an Accepted_name_family to prepend to the scrubbed name to parse.
676 636
';
677 637

  
......
681 641
--
682 642

  
683 643
CREATE VIEW taxon_scrub AS
684
 SELECT "ValidMatchedTaxon".scrubbed_unique_taxon_name, 
685
    "ValidMatchedTaxon"."*Name_matched.batch", 
686
    "ValidMatchedTaxon"."concatenatedScientificName", 
687
    "ValidMatchedTaxon"."matchedTaxonName", 
688
    "ValidMatchedTaxon"."matchedTaxonRank", 
689
    "ValidMatchedTaxon"."*Name_matched.Name_score", 
690
    "ValidMatchedTaxon"."matchedScientificNameAuthorship", 
691
    "ValidMatchedTaxon"."matchedScientificNameID", 
692
    "ValidMatchedTaxon"."*Name_matched.Author_score", 
693
    "ValidMatchedTaxon"."matchedFamilyConfidence_fraction", 
694
    "ValidMatchedTaxon"."matchedFamily", 
695
    "ValidMatchedTaxon"."matchedGenus", 
696
    "ValidMatchedTaxon"."matchedGenusConfidence_fraction", 
697
    "ValidMatchedTaxon"."matchedSpecificEpithet", 
698
    "ValidMatchedTaxon"."matchedSpeciesConfidence_fraction", 
699
    "ValidMatchedTaxon"."matchedInfraspecificEpithet", 
700
    "ValidMatchedTaxon"."*Name_matched.Infraspecific_epithet_score", 
701
    "ValidMatchedTaxon"."identificationQualifier", 
702
    "ValidMatchedTaxon"."morphospeciesSuffix", 
703
    "ValidMatchedTaxon"."taxonomicStatus", 
704
    "ValidMatchedTaxon".accepted_taxon_name_no_author, 
705
    "ValidMatchedTaxon".accepted_author, 
706
    "ValidMatchedTaxon".accepted_taxon_rank, 
707
    "ValidMatchedTaxon"."acceptedScientificNameID", 
708
    "ValidMatchedTaxon".accepted_species_binomial, 
709
    "ValidMatchedTaxon".accepted_family, 
710
    "ValidMatchedTaxon"."*Name_matched.Selected", 
711
    "ValidMatchedTaxon"."*Name_matched.Source", 
712
    "ValidMatchedTaxon"."*Name_matched.Warnings", 
713
    "ValidMatchedTaxon"."*Name_matched.Accepted_name_lsid", 
714
    "ValidMatchedTaxon".taxon_scrub__is_valid_match, 
715
    "ValidMatchedTaxon".accepted_morphospecies_binomial, 
716
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_taxon_rank, 
717
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_family, 
718
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_genus, 
719
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_specific_epithet, 
720
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_infraspecific_rank, 
721
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_infraspecific_epithet, 
722
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_author, 
723
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_taxon_name_no_author, 
724
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_taxon_name_with_author, 
644
 SELECT "ValidMatchedTaxon".scrubbed_unique_taxon_name,
645
    "ValidMatchedTaxon"."*Name_matched.batch",
646
    "ValidMatchedTaxon"."concatenatedScientificName",
647
    "ValidMatchedTaxon"."matchedTaxonName",
648
    "ValidMatchedTaxon"."matchedTaxonRank",
649
    "ValidMatchedTaxon"."*Name_matched.Name_score",
650
    "ValidMatchedTaxon"."matchedScientificNameAuthorship",
651
    "ValidMatchedTaxon"."matchedScientificNameID",
652
    "ValidMatchedTaxon"."*Name_matched.Author_score",
653
    "ValidMatchedTaxon"."matchedFamilyConfidence_fraction",
654
    "ValidMatchedTaxon"."matchedFamily",
655
    "ValidMatchedTaxon"."matchedGenus",
656
    "ValidMatchedTaxon"."matchedGenusConfidence_fraction",
657
    "ValidMatchedTaxon"."matchedSpecificEpithet",
658
    "ValidMatchedTaxon"."matchedSpeciesConfidence_fraction",
659
    "ValidMatchedTaxon"."matchedInfraspecificEpithet",
660
    "ValidMatchedTaxon"."*Name_matched.Infraspecific_epithet_score",
661
    "ValidMatchedTaxon"."identificationQualifier",
662
    "ValidMatchedTaxon"."morphospeciesSuffix",
663
    "ValidMatchedTaxon"."taxonomicStatus",
664
    "ValidMatchedTaxon".accepted_taxon_name_no_author,
665
    "ValidMatchedTaxon".accepted_author,
666
    "ValidMatchedTaxon".accepted_taxon_rank,
667
    "ValidMatchedTaxon"."acceptedScientificNameID",
668
    "ValidMatchedTaxon".accepted_species_binomial,
669
    "ValidMatchedTaxon".accepted_family,
670
    "ValidMatchedTaxon"."*Name_matched.Selected",
671
    "ValidMatchedTaxon"."*Name_matched.Source",
672
    "ValidMatchedTaxon"."*Name_matched.Warnings",
673
    "ValidMatchedTaxon"."*Name_matched.Accepted_name_lsid",
674
    "ValidMatchedTaxon".taxon_scrub__is_valid_match,
675
    "ValidMatchedTaxon".accepted_morphospecies_binomial,
676
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_taxon_rank,
677
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_family,
678
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_genus,
679
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_specific_epithet,
680
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_infraspecific_rank,
681
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_infraspecific_epithet,
682
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_author,
683
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_taxon_name_no_author,
684
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_taxon_name_with_author,
725 685
        CASE
726 686
            WHEN ("taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_taxon_rank = 'family'::text) THEN concat_ws(' '::text, "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_family, "ValidMatchedTaxon"."morphospeciesSuffix")
727 687
            WHEN ("taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_taxon_rank = 'genus'::text) THEN concat_ws(' '::text, "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_taxon_name_no_author, "ValidMatchedTaxon"."morphospeciesSuffix")
......
739 699

  
740 700
COMMENT ON VIEW taxon_scrub IS '
741 701
to modify:
742
SELECT "TNRS".taxon_scrub_modify($$
743
 SELECT *, __ AS scrubbed_morphospecies_binomial
744
   FROM "TNRS"."ValidMatchedTaxon"
745
   LEFT JOIN "TNRS"."taxon_scrub.scrubbed_unique_taxon_name.*" USING (scrubbed_unique_taxon_name);
702
SELECT util.recreate_view(''"TNRS".taxon_scrub'', $$
703
SELECT __
746 704
$$);
747 705
';
748 706

  
......
775 733
--
776 734

  
777 735
COPY batch (id, id_by_time, time_submitted, client_version) FROM stdin;
778
2014-06-02 04:36:16.989683-07	2014-06-02 04:36:16.989683-07	2014-06-02 04:36:16.989683-07	\N
736
2014-06-25 16:26:37.716529-07	2014-06-25 16:26:37.716529-07	2014-06-25 16:26:37.716529-07	\N
779 737
\.
780 738

  
781 739

  
......
796 754

  
797 755

  
798 756
--
799
-- Data for Name: tnrs; Type: TABLE DATA; Schema: TNRS; Owner: bien
757
-- Data for Name: tnrs_match; Type: TABLE DATA; Schema: TNRS; Owner: bien
800 758
--
801 759

  
802
COPY tnrs (batch, match_num, "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", is_valid_match, scrubbed_unique_taxon_name) FROM stdin;
803
2014-06-02 04:36:16.989683-07	0	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	f	\N
804
2014-06-02 04:36:16.989683-07	1	1	Poa annua var. eriolepis	1	Poa annua var. eriolepis	var.	1	̉ۡ.Desv.	http://www.theplantlist.org/tpl1.1/record/kew-435206	\N	\N	\N	\N	\N	Poa	1	annua	1	var.	eriolepis	1	\N	\N	\N	\N	\N	Synonym	Poa annua	L.	species	http://www.theplantlist.org/tpl1.1/record/kew-435194	Poa annua	Poaceae	true	tpl	 	\N	t	Poaceae Poa annua L.
805
2014-06-02 04:36:16.989683-07	2	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	false	tropicos	 	\N	t	Poaceae Poa annua L.
806
2014-06-02 04:36:16.989683-07	3	2	Poa annua	1	Poa annua	species	1	L.	http://www.theplantlist.org/tpl1.1/record/kew-435194;http://www.tropicos.org/Name/25509881;http://plants.usda.gov/java/profile?symbol=POAN	\N	\N	\N	\N	Poaceae	Poa	1	annua	1	\N	\N	\N	\N	\N	\N	\N	\N	Accepted	Poa annua	L.	species	http://www.theplantlist.org/tpl1.1/record/kew-435194;http://www.tropicos.org/Name/25509881;http://plants.usda.gov/java/profile?symbol=POAN	Poa annua	Poaceae	true	tpl;tropicos;usda	 	\N	t	Poaceae Poa annua L.
807
2014-06-02 04:36:16.989683-07	4	2	Poa annua	1	Poa annua	species	1	Cham. & Schltdl.	http://www.theplantlist.org/tpl1.1/record/kew-435195	\N	\N	\N	\N	Poaceae	Poa	1	annua	1	\N	\N	\N	\N	\N	\N	\N	\N	Synonym	Poa infirma	Kunth	species	http://www.theplantlist.org/tpl1.1/record/kew-436189	Poa infirma	Poaceae	false	tpl	 	\N	t	Poaceae Poa infirma Kunth
808
2014-06-02 04:36:16.989683-07	5	3	Silene scouleri Hook. subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire var. grisea C.L. Hitchc. & Maguire	0.770000000000000018	Silene scouleri subsp. pringlei	subsp.	0.770000000000000018	(S. Watson) C.L. Hitchc. & Maguire	http://www.theplantlist.org/tpl1.1/record/tro-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	subsp.	http://www.theplantlist.org/tpl1.1/record/tro-6303627	Silene scouleri	Caryophyllaceae	true	tpl	 [Partial match] 	\N	t	Caryophyllaceae Silene scouleri subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire
809
2014-06-02 04:36:16.989683-07	6	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	false	tropicos	 [Partial match] 	\N	t	Caryophyllaceae Silene scouleri subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire
810
2014-06-02 04:36:16.989683-07	7	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://plants.usda.gov/java/profile?symbol=SISCP	\N	\N	\N	\N	Caryophyllaceae	Silene	1	scouleri	1	subsp.	pringlei	1	\N	\N	\N	\N	var. grisea	Accepted	Silene scouleri ssp. pringlei	(S. Watson) C.L. Hitchc. & Maguire	subspecies	http://plants.usda.gov/java/profile?symbol=SISCP	Silene scouleri	Caryophyllaceae	false	usda	 [Partial match] 	\N	t	Caryophyllaceae Silene scouleri ssp. pringlei (S. Watson) C.L. Hitchc. & Maguire
811
2014-06-02 04:36:16.989683-07	8	4	Fabaceae Boyle#6500	0.839999999999999969	Fagaceae	family	0.939999999999999947	\N	;http://plants.usda.gov/java/nameSearch	\N	\N	Fagaceae	0.880000000000000004	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Boyle#6500	Accepted	Fagaceae	\N	family	;http://plants.usda.gov/java/nameSearch	\N	\N	true	tpl;usda	 	\N	f	Fagaceae
812
2014-06-02 04:36:16.989683-07	9	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	t	Fabaceae Lindl.
813
2014-06-02 04:36:16.989683-07	10	4	Fabaceae Boyle#6500	0.839999999999999969	Fagaceae	family	0.939999999999999947	Dumort.	http://www.tropicos.org/Name/42000062	\N	\N	Fagaceae	0.880000000000000004	Fagaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Boyle#6500	Accepted	Fagaceae	Dumort.	family	http://www.tropicos.org/Name/42000062	\N	Fagaceae	false	tropicos	 	\N	f	Fagaceae Dumort.
814
2014-06-02 04:36:16.989683-07	11	4	Fabaceae Boyle#6500	0.67000000000000004	Ficaceae	family	0.770000000000000018	Bercht. & J. Presl	http://www.tropicos.org/Name/100353631	\N	\N	Ficaceae	0.75	Ficaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Boyle#6500	No opinion	\N	\N	\N	\N	\N	\N	false	tropicos	 	\N	f	Ficaceae Bercht. & J. Presl
815
2014-06-02 04:36:16.989683-07	12	4	Fabaceae Boyle#6500	0.67000000000000004	Fucaceae	family	0.770000000000000018	\N	http://www.tropicos.org/Name/100371040	\N	\N	Fucaceae	0.75	Fucaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Boyle#6500	No opinion	\N	\N	\N	\N	\N	\N	false	tropicos	 	\N	f	Fucaceae
816
2014-06-02 04:36:16.989683-07	13	4	Fabaceae Boyle#6500	0.900000000000000022	Fabaceae	family	1	\N	http://plants.usda.gov/java/nameSearch	\N	\N	Fabaceae	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Boyle#6500	Accepted	Fabaceae	\N	family	http://plants.usda.gov/java/nameSearch	\N	\N	false	usda	 	\N	t	Fabaceae
817
2014-06-02 04:36:16.989683-07	14	5	Poa annua subsp. exilis	1	Poa annua subsp. exilis	subsp.	1	(Tomm. ex Freyn.) Asch. & Graebn.	http://www.theplantlist.org/tpl1.1/record/kew-435202	\N	\N	\N	\N	\N	Poa	1	annua	1	subsp.	exilis	1	\N	\N	\N	\N	\N	Synonym	Poa infirma	Kunth	species	http://www.theplantlist.org/tpl1.1/record/kew-436189	Poa infirma	Poaceae	true	tpl	 	\N	t	Poaceae Poa infirma Kunth
818
2014-06-02 04:36:16.989683-07	15	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	false	tropicos	 	\N	t	Poaceae Poa infirma Kunth
819
2014-06-02 04:36:16.989683-07	16	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	t	Poaceae Poa infirma Kunth
820
2014-06-02 04:36:16.989683-07	17	6	Poa annua ssp. exilis	0.959999999999999964	Poa annua var. exilis	variety	0.959999999999999964	Tomm. ex Freyn	http://www.tropicos.org/Name/25547854	\N	\N	\N	\N	Poaceae	Poa	1	annua	1	var.	exilis	0.699999999999999956	\N	\N	\N	\N	\N	Synonym	Poa infirma	Kunth	species	http://www.tropicos.org/Name/25514158	Poa infirma	Poaceae	false	tropicos	 	\N	t	Poaceae Poa infirma Kunth
821
2014-06-02 04:36:16.989683-07	18	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	t	Poaceae Poa annua subvar. minima (Schur) Asch. & Graebn.
822
2014-06-02 04:36:16.989683-07	19	8	Poa annua L.	1	Poa annua	species	1	L.	http://www.theplantlist.org/tpl1.1/record/kew-435194;http://www.tropicos.org/Name/25509881;http://plants.usda.gov/java/profile?symbol=POAN	L.	1	\N	\N	Poaceae	Poa	1	annua	1	\N	\N	\N	\N	\N	\N	\N	\N	Accepted	Poa annua	L.	species	http://www.theplantlist.org/tpl1.1/record/kew-435194;http://www.tropicos.org/Name/25509881;http://plants.usda.gov/java/profile?symbol=POAN	Poa annua	Poaceae	true	tpl;tropicos;usda	 	\N	t	Poaceae Poa annua L.
823
2014-06-02 04:36:16.989683-07	20	8	Poa annua L.	0.800000000000000044	Poa annua	species	1	Cham. & Schltdl.	http://www.theplantlist.org/tpl1.1/record/kew-435195	Cham. & Schltdl.	0	\N	\N	Poaceae	Poa	1	annua	1	\N	\N	\N	\N	\N	\N	\N	\N	Synonym	Poa infirma	Kunth	species	http://www.theplantlist.org/tpl1.1/record/kew-436189	Poa infirma	Poaceae	false	tpl	 	\N	t	Poaceae Poa infirma Kunth
824
2014-06-02 04:36:16.989683-07	21	9	Compositae indet. sp.1	0.900000000000000022	Compositae	family	1	\N	http://www.theplantlist.org/1.1/browse/A/Compositae/	\N	\N	Compositae	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	indet. sp.1	Accepted	Compositae	\N	family	http://www.theplantlist.org/1.1/browse/A/Compositae/	\N	\N	true	tpl	 [Ambiguous match] 	\N	t	Compositae
825
2014-06-02 04:36:16.989683-07	22	9	Compositae indet. sp.1	0.900000000000000022	Compositae	family	1	\N	\N	\N	\N	Compositae	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	indet. sp.1	Accepted	Compositae	\N	family	\N	\N	\N	false	tpl	 [Ambiguous match] 	\N	t	Compositae
826
2014-06-02 04:36:16.989683-07	23	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	false	tropicos	 	\N	t	Asteraceae Bercht. & J. Presl
827
2014-06-02 04:36:16.989683-07	24	10	Poa annua fo. lanuginosa	1	Poa annua fo. lanuginosa	fo.	1	Sennen	http://www.theplantlist.org/tpl1.1/record/tro-50267771	\N	\N	\N	\N	\N	Poa	1	annua	1	fo.	lanuginosa	1	\N	\N	\N	\N	\N	Synonym	Poa annua	L.	species	http://www.theplantlist.org/tpl1.1/record/kew-435194	Poa annua	Poaceae	true	tpl	 	\N	t	Poaceae Poa annua L.
828
2014-06-02 04:36:16.989683-07	25	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	false	tropicos	 	\N	t	Poaceae Poa annua var. annua
829
2014-06-02 04:36:16.989683-07	26	11	Silene scouleri subsp. pringlei var. grisea C.L. Hitchc. & Maguire	0.770000000000000018	Silene scouleri subsp. pringlei	subsp.	0.770000000000000018	(S. Watson) C.L. Hitchc. & Maguire	http://www.theplantlist.org/tpl1.1/record/tro-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	subsp.	http://www.theplantlist.org/tpl1.1/record/tro-6303627	Silene scouleri	Caryophyllaceae	true	tpl	 [Partial match] 	\N	t	Caryophyllaceae Silene scouleri subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire
830
2014-06-02 04:36:16.989683-07	27	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	false	tropicos	 [Partial match] 	\N	t	Caryophyllaceae Silene scouleri subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire
831
2014-06-02 04:36:16.989683-07	28	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://plants.usda.gov/java/profile?symbol=SISCP	\N	\N	\N	\N	Caryophyllaceae	Silene	1	scouleri	1	subsp.	pringlei	1	\N	\N	\N	\N	var. grisea	Accepted	Silene scouleri ssp. pringlei	(S. Watson) C.L. Hitchc. & Maguire	subspecies	http://plants.usda.gov/java/profile?symbol=SISCP	Silene scouleri	Caryophyllaceae	false	usda	 [Partial match] 	\N	t	Caryophyllaceae Silene scouleri ssp. pringlei (S. Watson) C.L. Hitchc. & Maguire
832
2014-06-02 04:36:16.989683-07	29	12	Fabaceae Inga "fuzzy leaf"	0.900000000000000022	Inga	genus	1	\N	http://www.theplantlist.org/1.1/browse/A/Leguminosae/Inga/;http://plants.usda.gov/java/profile?symbol=INGA	\N	\N	Fabaceae	1	Fabaceae	Inga	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	"fuzzy leaf"	Accepted	Inga	\N	genus	http://www.theplantlist.org/1.1/browse/A/Leguminosae/Inga/;http://plants.usda.gov/java/profile?symbol=INGA	\N	Fabaceae	true	tpl;usda	 	\N	t	Fabaceae Inga
833
2014-06-02 04:36:16.989683-07	30	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	false	tropicos	 	\N	t	Fabaceae Inga Mill.
834
2014-06-02 04:36:16.989683-07	31	12	Fabaceae Inga "fuzzy leaf"	0.900000000000000022	Inga	genus	1	Scop.	http://www.tropicos.org/Name/50215121	\N	\N	Fabaceae	1	Fabaceae	Inga	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	"fuzzy leaf"	Illegitimate	\N	\N	\N	\N	\N	\N	false	tropicos	 	\N	t	Fabaceae Inga Scop.
835
2014-06-02 04:36:16.989683-07	32	13	Fabaceae Inga sp.3	0.900000000000000022	Inga	genus	1	\N	http://www.theplantlist.org/1.1/browse/A/Leguminosae/Inga/;http://plants.usda.gov/java/profile?symbol=INGA	\N	\N	Fabaceae	1	Fabaceae	Inga	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	sp.3	Accepted	Inga	\N	genus	http://www.theplantlist.org/1.1/browse/A/Leguminosae/Inga/;http://plants.usda.gov/java/profile?symbol=INGA	\N	Fabaceae	true	tpl;usda	 	\N	t	Fabaceae Inga
836
2014-06-02 04:36:16.989683-07	33	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	false	tropicos	 	\N	t	Fabaceae Inga Mill.
837
2014-06-02 04:36:16.989683-07	34	13	Fabaceae Inga sp.3	0.900000000000000022	Inga	genus	1	Scop.	http://www.tropicos.org/Name/50215121	\N	\N	Fabaceae	1	Fabaceae	Inga	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	sp.3	Illegitimate	\N	\N	\N	\N	\N	\N	false	tropicos	 	\N	t	Fabaceae Inga Scop.
838
2014-06-02 04:36:16.989683-07	35	14	Fabaceae unknown #2	0.839999999999999969	Fagaceae	family	0.939999999999999947	\N	;http://plants.usda.gov/java/nameSearch	\N	\N	Fagaceae	0.880000000000000004	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	unknown #2	Accepted	Fagaceae	\N	family	;http://plants.usda.gov/java/nameSearch	\N	\N	true	tpl;usda	 	\N	f	Fagaceae
839
2014-06-02 04:36:16.989683-07	36	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	t	Fabaceae Lindl.
840
2014-06-02 04:36:16.989683-07	37	14	Fabaceae unknown #2	0.839999999999999969	Fagaceae	family	0.939999999999999947	Dumort.	http://www.tropicos.org/Name/42000062	\N	\N	Fagaceae	0.880000000000000004	Fagaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	unknown #2	Accepted	Fagaceae	Dumort.	family	http://www.tropicos.org/Name/42000062	\N	Fagaceae	false	tropicos	 	\N	f	Fagaceae Dumort.
841
2014-06-02 04:36:16.989683-07	38	14	Fabaceae unknown #2	0.67000000000000004	Ficaceae	family	0.770000000000000018	Bercht. & J. Presl	http://www.tropicos.org/Name/100353631	\N	\N	Ficaceae	0.75	Ficaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	unknown #2	No opinion	\N	\N	\N	\N	\N	\N	false	tropicos	 	\N	f	Ficaceae Bercht. & J. Presl
842
2014-06-02 04:36:16.989683-07	39	14	Fabaceae unknown #2	0.67000000000000004	Fucaceae	family	0.770000000000000018	\N	http://www.tropicos.org/Name/100371040	\N	\N	Fucaceae	0.75	Fucaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	unknown #2	No opinion	\N	\N	\N	\N	\N	\N	false	tropicos	 	\N	f	Fucaceae
843
2014-06-02 04:36:16.989683-07	40	14	Fabaceae unknown #2	0.900000000000000022	Fabaceae	family	1	\N	http://plants.usda.gov/java/nameSearch	\N	\N	Fabaceae	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	unknown #2	Accepted	Fabaceae	\N	family	http://plants.usda.gov/java/nameSearch	\N	\N	false	usda	 	\N	t	Fabaceae
760
COPY tnrs_match (batch, match_num, "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", is_valid_match, scrubbed_unique_taxon_name) FROM stdin;
761
2014-06-25 16:26:37.716529-07	0	0	Compositae indet. sp.1	0.900000000000000022	Compositae	family	1	\N	http://www.theplantlist.org/1.1/browse/A/Compositae/	\N	\N	Compositae	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	indet. sp.1	Accepted	Compositae	\N	family	http://www.theplantlist.org/1.1/browse/A/Compositae/	\N	\N	true	tpl	 [Ambiguous match] 	\N	t	Compositae
762
2014-06-25 16:26:37.716529-07	1	0	Compositae indet. sp.1	0.900000000000000022	Compositae	family	1	\N	\N	\N	\N	Compositae	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	indet. sp.1	Accepted	Compositae	\N	family	\N	\N	\N	false	tpl	 [Ambiguous match] 	\N	t	Compositae
763
2014-06-25 16:26:37.716529-07	2	0	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	false	tropicos	 	\N	t	Asteraceae Bercht. & J. Presl
764
2014-06-25 16:26:37.716529-07	3	1	Fabaceae Boyle#6500	0.839999999999999969	Fagaceae	family	0.939999999999999947	\N	;http://plants.usda.gov/java/nameSearch	\N	\N	Fagaceae	0.880000000000000004	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Boyle#6500	Accepted	Fagaceae	\N	family	;http://plants.usda.gov/java/nameSearch	\N	\N	true	tpl;usda	 	\N	f	Fagaceae
765
2014-06-25 16:26:37.716529-07	4	1	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	t	Fabaceae Lindl.
766
2014-06-25 16:26:37.716529-07	5	1	Fabaceae Boyle#6500	0.839999999999999969	Fagaceae	family	0.939999999999999947	Dumort.	http://www.tropicos.org/Name/42000062	\N	\N	Fagaceae	0.880000000000000004	Fagaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Boyle#6500	Accepted	Fagaceae	Dumort.	family	http://www.tropicos.org/Name/42000062	\N	Fagaceae	false	tropicos	 	\N	f	Fagaceae Dumort.
767
2014-06-25 16:26:37.716529-07	6	1	Fabaceae Boyle#6500	0.67000000000000004	Ficaceae	family	0.770000000000000018	Bercht. & J. Presl	http://www.tropicos.org/Name/100353631	\N	\N	Ficaceae	0.75	Ficaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Boyle#6500	No opinion	\N	\N	\N	\N	\N	\N	false	tropicos	 	\N	f	Ficaceae Bercht. & J. Presl
768
2014-06-25 16:26:37.716529-07	7	1	Fabaceae Boyle#6500	0.67000000000000004	Fucaceae	family	0.770000000000000018	\N	http://www.tropicos.org/Name/100371040	\N	\N	Fucaceae	0.75	Fucaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Boyle#6500	No opinion	\N	\N	\N	\N	\N	\N	false	tropicos	 	\N	f	Fucaceae
769
2014-06-25 16:26:37.716529-07	8	1	Fabaceae Boyle#6500	0.900000000000000022	Fabaceae	family	1	\N	http://plants.usda.gov/java/nameSearch	\N	\N	Fabaceae	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	Boyle#6500	Accepted	Fabaceae	\N	family	http://plants.usda.gov/java/nameSearch	\N	\N	false	usda	 	\N	t	Fabaceae
770
2014-06-25 16:26:37.716529-07	9	2	Fabaceae Inga "fuzzy leaf"	0.900000000000000022	Inga	genus	1	\N	http://www.theplantlist.org/1.1/browse/A/Leguminosae/Inga/;http://plants.usda.gov/java/profile?symbol=INGA	\N	\N	Fabaceae	1	Fabaceae	Inga	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	"fuzzy leaf"	Accepted	Inga	\N	genus	http://www.theplantlist.org/1.1/browse/A/Leguminosae/Inga/;http://plants.usda.gov/java/profile?symbol=INGA	\N	Fabaceae	true	tpl;usda	 	\N	t	Fabaceae Inga
771
2014-06-25 16:26:37.716529-07	10	2	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	false	tropicos	 	\N	t	Fabaceae Inga Mill.
772
2014-06-25 16:26:37.716529-07	11	2	Fabaceae Inga "fuzzy leaf"	0.900000000000000022	Inga	genus	1	Scop.	http://www.tropicos.org/Name/50215121	\N	\N	Fabaceae	1	Fabaceae	Inga	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	"fuzzy leaf"	Illegitimate	\N	\N	\N	\N	\N	\N	false	tropicos	 	\N	t	Fabaceae Inga Scop.
773
2014-06-25 16:26:37.716529-07	12	3	Fabaceae Inga sp.3	0.900000000000000022	Inga	genus	1	\N	http://www.theplantlist.org/1.1/browse/A/Leguminosae/Inga/;http://plants.usda.gov/java/profile?symbol=INGA	\N	\N	Fabaceae	1	Fabaceae	Inga	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	sp.3	Accepted	Inga	\N	genus	http://www.theplantlist.org/1.1/browse/A/Leguminosae/Inga/;http://plants.usda.gov/java/profile?symbol=INGA	\N	Fabaceae	true	tpl;usda	 	\N	t	Fabaceae Inga
774
2014-06-25 16:26:37.716529-07	13	3	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	false	tropicos	 	\N	t	Fabaceae Inga Mill.
775
2014-06-25 16:26:37.716529-07	14	3	Fabaceae Inga sp.3	0.900000000000000022	Inga	genus	1	Scop.	http://www.tropicos.org/Name/50215121	\N	\N	Fabaceae	1	Fabaceae	Inga	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	sp.3	Illegitimate	\N	\N	\N	\N	\N	\N	false	tropicos	 	\N	t	Fabaceae Inga Scop.
776
2014-06-25 16:26:37.716529-07	15	4	Fabaceae unknown #2	0.839999999999999969	Fagaceae	family	0.939999999999999947	\N	;http://plants.usda.gov/java/nameSearch	\N	\N	Fagaceae	0.880000000000000004	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	unknown #2	Accepted	Fagaceae	\N	family	;http://plants.usda.gov/java/nameSearch	\N	\N	true	tpl;usda	 	\N	f	Fagaceae
777
2014-06-25 16:26:37.716529-07	16	4	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	t	Fabaceae Lindl.
778
2014-06-25 16:26:37.716529-07	17	4	Fabaceae unknown #2	0.839999999999999969	Fagaceae	family	0.939999999999999947	Dumort.	http://www.tropicos.org/Name/42000062	\N	\N	Fagaceae	0.880000000000000004	Fagaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	unknown #2	Accepted	Fagaceae	Dumort.	family	http://www.tropicos.org/Name/42000062	\N	Fagaceae	false	tropicos	 	\N	f	Fagaceae Dumort.
779
2014-06-25 16:26:37.716529-07	18	4	Fabaceae unknown #2	0.67000000000000004	Ficaceae	family	0.770000000000000018	Bercht. & J. Presl	http://www.tropicos.org/Name/100353631	\N	\N	Ficaceae	0.75	Ficaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	unknown #2	No opinion	\N	\N	\N	\N	\N	\N	false	tropicos	 	\N	f	Ficaceae Bercht. & J. Presl
780
2014-06-25 16:26:37.716529-07	19	4	Fabaceae unknown #2	0.67000000000000004	Fucaceae	family	0.770000000000000018	\N	http://www.tropicos.org/Name/100371040	\N	\N	Fucaceae	0.75	Fucaceae	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	unknown #2	No opinion	\N	\N	\N	\N	\N	\N	false	tropicos	 	\N	f	Fucaceae
781
2014-06-25 16:26:37.716529-07	20	4	Fabaceae unknown #2	0.900000000000000022	Fabaceae	family	1	\N	http://plants.usda.gov/java/nameSearch	\N	\N	Fabaceae	1	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	\N	unknown #2	Accepted	Fabaceae	\N	family	http://plants.usda.gov/java/nameSearch	\N	\N	false	usda	 	\N	t	Fabaceae
782
2014-06-25 16:26:37.716529-07	21	5	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	f	\N
783
2014-06-25 16:26:37.716529-07	22	6	Poa annua	1	Poa annua	species	1	L.	http://www.theplantlist.org/tpl1.1/record/kew-435194;http://www.tropicos.org/Name/25509881;http://plants.usda.gov/java/profile?symbol=POAN	\N	\N	\N	\N	Poaceae	Poa	1	annua	1	\N	\N	\N	\N	\N	\N	\N	\N	Accepted	Poa annua	L.	species	http://www.theplantlist.org/tpl1.1/record/kew-435194;http://www.tropicos.org/Name/25509881;http://plants.usda.gov/java/profile?symbol=POAN	Poa annua	Poaceae	true	tpl;tropicos;usda	 	\N	t	Poaceae Poa annua L.
784
2014-06-25 16:26:37.716529-07	23	6	Poa annua	1	Poa annua	species	1	Cham. & Schltdl.	http://www.theplantlist.org/tpl1.1/record/kew-435195	\N	\N	\N	\N	Poaceae	Poa	1	annua	1	\N	\N	\N	\N	\N	\N	\N	\N	Synonym	Poa infirma	Kunth	species	http://www.theplantlist.org/tpl1.1/record/kew-436189	Poa infirma	Poaceae	false	tpl	 	\N	t	Poaceae Poa infirma Kunth
785
2014-06-25 16:26:37.716529-07	24	7	Poa annua L.	1	Poa annua	species	1	L.	http://www.theplantlist.org/tpl1.1/record/kew-435194;http://www.tropicos.org/Name/25509881;http://plants.usda.gov/java/profile?symbol=POAN	L.	1	\N	\N	Poaceae	Poa	1	annua	1	\N	\N	\N	\N	\N	\N	\N	\N	Accepted	Poa annua	L.	species	http://www.theplantlist.org/tpl1.1/record/kew-435194;http://www.tropicos.org/Name/25509881;http://plants.usda.gov/java/profile?symbol=POAN	Poa annua	Poaceae	true	tpl;tropicos;usda	 	\N	t	Poaceae Poa annua L.
786
2014-06-25 16:26:37.716529-07	25	7	Poa annua L.	0.800000000000000044	Poa annua	species	1	Cham. & Schltdl.	http://www.theplantlist.org/tpl1.1/record/kew-435195	Cham. & Schltdl.	0	\N	\N	Poaceae	Poa	1	annua	1	\N	\N	\N	\N	\N	\N	\N	\N	Synonym	Poa infirma	Kunth	species	http://www.theplantlist.org/tpl1.1/record/kew-436189	Poa infirma	Poaceae	false	tpl	 	\N	t	Poaceae Poa infirma Kunth
787
2014-06-25 16:26:37.716529-07	26	8	Poa annua fo. lanuginosa	1	Poa annua fo. lanuginosa	fo.	1	Sennen	http://www.theplantlist.org/tpl1.1/record/tro-50267771	\N	\N	\N	\N	\N	Poa	1	annua	1	fo.	lanuginosa	1	\N	\N	\N	\N	\N	Synonym	Poa annua	L.	species	http://www.theplantlist.org/tpl1.1/record/kew-435194	Poa annua	Poaceae	true	tpl	 	\N	t	Poaceae Poa annua L.
788
2014-06-25 16:26:37.716529-07	27	8	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	false	tropicos	 	\N	t	Poaceae Poa annua var. annua
789
2014-06-25 16:26:37.716529-07	28	9	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	t	Poaceae Poa infirma Kunth
790
2014-06-25 16:26:37.716529-07	29	9	Poa annua ssp. exilis	0.959999999999999964	Poa annua var. exilis	variety	0.959999999999999964	Tomm. ex Freyn	http://www.tropicos.org/Name/25547854	\N	\N	\N	\N	Poaceae	Poa	1	annua	1	var.	exilis	0.699999999999999956	\N	\N	\N	\N	\N	Synonym	Poa infirma	Kunth	species	http://www.tropicos.org/Name/25514158	Poa infirma	Poaceae	false	tropicos	 	\N	t	Poaceae Poa infirma Kunth
791
2014-06-25 16:26:37.716529-07	30	10	Poa annua subsp. exilis	1	Poa annua subsp. exilis	subsp.	1	(Tomm. ex Freyn.) Asch. & Graebn.	http://www.theplantlist.org/tpl1.1/record/kew-435202	\N	\N	\N	\N	\N	Poa	1	annua	1	subsp.	exilis	1	\N	\N	\N	\N	\N	Synonym	Poa infirma	Kunth	species	http://www.theplantlist.org/tpl1.1/record/kew-436189	Poa infirma	Poaceae	true	tpl	 	\N	t	Poaceae Poa infirma Kunth
792
2014-06-25 16:26:37.716529-07	31	10	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	false	tropicos	 	\N	t	Poaceae Poa infirma Kunth
793
2014-06-25 16:26:37.716529-07	32	11	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	t	Poaceae Poa annua subvar. minima (Schur) Asch. & Graebn.
794
2014-06-25 16:26:37.716529-07	33	12	Poa annua var. eriolepis	1	Poa annua var. eriolepis	var.	1	̉ۡ.Desv.	http://www.theplantlist.org/tpl1.1/record/kew-435206	\N	\N	\N	\N	\N	Poa	1	annua	1	var.	eriolepis	1	\N	\N	\N	\N	\N	Synonym	Poa annua	L.	species	http://www.theplantlist.org/tpl1.1/record/kew-435194	Poa annua	Poaceae	true	tpl	 	\N	t	Poaceae Poa annua L.
795
2014-06-25 16:26:37.716529-07	34	12	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	false	tropicos	 	\N	t	Poaceae Poa annua L.
796
2014-06-25 16:26:37.716529-07	35	13	Silene scouleri Hook. subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire var. grisea C.L. Hitchc. & Maguire	0.770000000000000018	Silene scouleri subsp. pringlei	subsp.	0.770000000000000018	(S. Watson) C.L. Hitchc. & Maguire	http://www.theplantlist.org/tpl1.1/record/tro-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	subsp.	http://www.theplantlist.org/tpl1.1/record/tro-6303627	Silene scouleri	Caryophyllaceae	true	tpl	 [Partial match] 	\N	t	Caryophyllaceae Silene scouleri subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire
797
2014-06-25 16:26:37.716529-07	36	13	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	false	tropicos	 [Partial match] 	\N	t	Caryophyllaceae Silene scouleri subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire
798
2014-06-25 16:26:37.716529-07	37	13	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://plants.usda.gov/java/profile?symbol=SISCP	\N	\N	\N	\N	Caryophyllaceae	Silene	1	scouleri	1	subsp.	pringlei	1	\N	\N	\N	\N	var. grisea	Accepted	Silene scouleri ssp. pringlei	(S. Watson) C.L. Hitchc. & Maguire	subspecies	http://plants.usda.gov/java/profile?symbol=SISCP	Silene scouleri	Caryophyllaceae	false	usda	 [Partial match] 	\N	t	Caryophyllaceae Silene scouleri ssp. pringlei (S. Watson) C.L. Hitchc. & Maguire
799
2014-06-25 16:26:37.716529-07	38	14	Silene scouleri subsp. pringlei var. grisea C.L. Hitchc. & Maguire	0.770000000000000018	Silene scouleri subsp. pringlei	subsp.	0.770000000000000018	(S. Watson) C.L. Hitchc. & Maguire	http://www.theplantlist.org/tpl1.1/record/tro-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	subsp.	http://www.theplantlist.org/tpl1.1/record/tro-6303627	Silene scouleri	Caryophyllaceae	true	tpl	 [Partial match] 	\N	t	Caryophyllaceae Silene scouleri subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire
800
2014-06-25 16:26:37.716529-07	39	14	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	false	tropicos	 [Partial match] 	\N	t	Caryophyllaceae Silene scouleri subsp. pringlei (S. Watson) C.L. Hitchc. & Maguire
801
2014-06-25 16:26:37.716529-07	40	14	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://plants.usda.gov/java/profile?symbol=SISCP	\N	\N	\N	\N	Caryophyllaceae	Silene	1	scouleri	1	subsp.	pringlei	1	\N	\N	\N	\N	var. grisea	Accepted	Silene scouleri ssp. pringlei	(S. Watson) C.L. Hitchc. & Maguire	subspecies	http://plants.usda.gov/java/profile?symbol=SISCP	Silene scouleri	Caryophyllaceae	false	usda	 [Partial match] 	\N	t	Caryophyllaceae Silene scouleri ssp. pringlei (S. Watson) C.L. Hitchc. & Maguire
844 802
\.
845 803

  
846 804

  
......
899 857
-- Name: tnrs_pkey; Type: CONSTRAINT; Schema: TNRS; Owner: bien; Tablespace: 
900 858
--
901 859

  
902
ALTER TABLE ONLY tnrs
860
ALTER TABLE ONLY tnrs_match
903 861
    ADD CONSTRAINT tnrs_pkey PRIMARY KEY (batch, match_num);
904 862

  
905 863

  
......
930 888
-- Name: tnrs_Name_submitted_idx; Type: INDEX; Schema: TNRS; Owner: bien; Tablespace: 
931 889
--
932 890

  
933
CREATE INDEX "tnrs_Name_submitted_idx" ON tnrs USING btree ("Name_submitted");
891
CREATE INDEX "tnrs_Name_submitted_idx" ON tnrs_match USING btree ("Name_submitted");
934 892

  
935 893

  
936 894
--
937 895
-- Name: tnrs__valid_match; Type: INDEX; Schema: TNRS; Owner: bien; Tablespace: 
938 896
--
939 897

  
940
CREATE INDEX tnrs__valid_match ON tnrs USING btree ("Name_submitted") WHERE is_valid_match;
898
CREATE INDEX tnrs__valid_match ON tnrs_match USING btree ("Name_submitted") WHERE is_valid_match;
941 899

  
942 900

  
943 901
--
......
960 918
-- Name: tnrs__batch_begin; Type: TRIGGER; Schema: TNRS; Owner: bien
961 919
--
962 920

  
963
CREATE TRIGGER tnrs__batch_begin BEFORE INSERT ON tnrs FOR EACH STATEMENT EXECUTE PROCEDURE tnrs__batch_begin();
921
CREATE TRIGGER tnrs__batch_begin BEFORE INSERT ON tnrs_match FOR EACH STATEMENT EXECUTE PROCEDURE tnrs__batch_begin();
964 922

  
965 923

  
966 924
--
967 925
-- Name: tnrs__match_num__fill; Type: TRIGGER; Schema: TNRS; Owner: bien
968 926
--
969 927

  
970
CREATE TRIGGER tnrs__match_num__fill BEFORE INSERT ON tnrs FOR EACH ROW EXECUTE PROCEDURE tnrs__match_num__fill();
928
CREATE TRIGGER tnrs__match_num__fill BEFORE INSERT ON tnrs_match FOR EACH ROW EXECUTE PROCEDURE tnrs__match_num__fill();
971 929

  
972 930

  
973 931
--
974 932
-- Name: tnrs_populate_fields; Type: TRIGGER; Schema: TNRS; Owner: bien
975 933
--
976 934

  
977
CREATE TRIGGER tnrs_populate_fields BEFORE INSERT OR UPDATE ON tnrs FOR EACH ROW EXECUTE PROCEDURE tnrs_populate_fields();
935
CREATE TRIGGER tnrs_populate_fields BEFORE INSERT OR UPDATE ON tnrs_match FOR EACH ROW EXECUTE PROCEDURE tnrs_populate_fields();
978 936

  
979 937

  
980 938
--
......
997 955
-- Name: tnrs_batch_fkey; Type: FK CONSTRAINT; Schema: TNRS; Owner: bien
998 956
--
999 957

  
1000
ALTER TABLE ONLY tnrs
958
ALTER TABLE ONLY tnrs_match
1001 959
    ADD CONSTRAINT tnrs_batch_fkey FOREIGN KEY (batch) REFERENCES batch(id) ON UPDATE CASCADE ON DELETE CASCADE;
1002 960

  
1003 961

  
......
1012 970

  
1013 971

  
1014 972
--
1015
-- Name: tnrs; Type: ACL; Schema: TNRS; Owner: bien
973
-- Name: tnrs_match; Type: ACL; Schema: TNRS; Owner: bien
1016 974
--
1017 975

  
1018
REVOKE ALL ON TABLE tnrs FROM PUBLIC;
1019
REVOKE ALL ON TABLE tnrs FROM bien;
1020
GRANT ALL ON TABLE tnrs TO bien;
1021
GRANT SELECT ON TABLE tnrs TO bien_read;
976
REVOKE ALL ON TABLE tnrs_match FROM PUBLIC;
977
REVOKE ALL ON TABLE tnrs_match FROM bien;
978
GRANT ALL ON TABLE tnrs_match TO bien;
979
GRANT SELECT ON TABLE tnrs_match TO bien_read;
1022 980

  
1023 981

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

  
25
COMMENT ON SCHEMA "public.test_taxonomic_names" IS 'Version: public (2014-6-2 4:36:24 PDT)';
25
COMMENT ON SCHEMA "public.test_taxonomic_names" IS 'Version: public (2014-6-25 16:26:50 PDT)';
26 26

  
27 27

  
28 28
SET search_path = "public.test_taxonomic_names", pg_catalog;
......
763 763
ALTER FUNCTION "public.test_taxonomic_names"._taxonomic_name_is_epithet(rank taxonrank) OWNER TO bien;
764 764

  
765 765
--
766
-- Name: analytical_stem_view_modify(); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
767
--
768

  
769
CREATE FUNCTION analytical_stem_view_modify() RETURNS void
770
    LANGUAGE sql
771
    AS $_$
772
SELECT util.recreate($$
773
DROP TABLE IF EXISTS analytical_stem;
774
SELECT util.copy('analytical_stem_view', 'analytical_stem');
775
ALTER TABLE analytical_stem ADD COLUMN "TAXONOBSERVATION_ID__@VegBank__.taxonObservation@vegpath.org" serial PRIMARY KEY;
776

  
777
GRANT SELECT ON TABLE analytical_stem TO bien_read;
778
GRANT SELECT ON TABLE analytical_stem_view TO bien_read;
779

  
780
ALTER TABLE analytical_stem ALTER COLUMN "datasource__@Brad__.identifier_examples@vegpath.org" SET NOT NULL;
781
ALTER TABLE analytical_stem ALTER COLUMN "locationID__@DwC__@vegpath.org" SET NOT NULL;
782

  
783
CREATE INDEX ON analytical_stem ("datasource__@Brad__.identifier_examples@vegpath.org", "occurrenceID__@DwC__@vegpath.org");
784
CREATE INDEX ON analytical_stem ("datasource__@Brad__.identifier_examples@vegpath.org", "[custodial_]institutionCode[s]__@DwC__@vegpath.org", "collectionCode__@DwC__@vegpath.org", "catalogNumber__@DwC__@vegpath.org");
785
CREATE INDEX ON analytical_stem ("datasource__@Brad__.identifier_examples@vegpath.org", "projectID__@VegX__.plotObservation@vegpath.org", "locationID__@DwC__@vegpath.org", "eventDate__@DwC__@vegpath.org");
786
CREATE INDEX ON analytical_stem ("speciesBinomialWithMorphospecies__@VegCore__@vegpath.org");
787
$$);
788
$_$;
789

  
790

  
791
ALTER FUNCTION "public.test_taxonomic_names".analytical_stem_view_modify() OWNER TO bien;
792

  
793
--
766 794
-- Name: datasource_publish(text, anyelement); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
767 795
--
768 796

  
......
932 960
ALTER FUNCTION "public.test_taxonomic_names".delete_scrubbed_taxondeterminations(datasource text) OWNER TO bien;
933 961

  
934 962
--
963
-- Name: geoscrub_input_view_modify(); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
964
--
965

  
966
CREATE FUNCTION geoscrub_input_view_modify() RETURNS void
967
    LANGUAGE sql
968
    AS $$
969
DROP TABLE IF EXISTS geoscrub_input;
970
SELECT util.copy('geoscrub_input_view', 'geoscrub_input');
971

  
972
GRANT SELECT ON TABLE geoscrub_input TO bien_read;
973
GRANT SELECT ON TABLE geoscrub_input_view TO bien_read;
974
$$;
975

  
976

  
977
ALTER FUNCTION "public.test_taxonomic_names".geoscrub_input_view_modify() OWNER TO bien;
978

  
979
--
980
-- Name: lat_long_in_new_world(double precision, double precision); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
981
--
982

  
983
CREATE FUNCTION lat_long_in_new_world(latitude_deg double precision, longitude_deg double precision) RETURNS boolean
984
    LANGUAGE sql IMMUTABLE
985
    AS $_$
986
SELECT util.lat_long_in_new_world($1, $2)
987
$_$;
988

  
989

  
990
ALTER FUNCTION "public.test_taxonomic_names".lat_long_in_new_world(latitude_deg double precision, longitude_deg double precision) OWNER TO bien;
991

  
992
--
993
-- Name: FUNCTION lat_long_in_new_world(latitude_deg double precision, longitude_deg double precision); Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
994
--
995

  
996
COMMENT ON FUNCTION lat_long_in_new_world(latitude_deg double precision, longitude_deg double precision) IS '
997
wrapper that prevents views from getting dropped when the util schema is reinstalled
998
';
999

  
1000

  
1001
--
935 1002
-- Name: location__pull_forward_from_parent(); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
936 1003
--
937 1004

  
......
1457 1524
ALTER FUNCTION "public.test_taxonomic_names".plantobservation_aggregateoccurrence_count_1() OWNER TO bien;
1458 1525

  
1459 1526
--
1527
-- Name: plot.**.modify(text, anyelement); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
1528
--
1529

  
1530
CREATE FUNCTION "plot.**.modify"(view_query text DEFAULT NULL::text, schema_anchor anyelement DEFAULT NULL::schema_anchor) RETURNS void
1531
    LANGUAGE plpgsql
1532
    AS $_$
1533
/* must use LANGUAGE plpgsql because LANGUAGE sql does not support runtime
1534
changes of search_path (schema elements are bound at inline time rather than
1535
runtime) */
1536
/* function option search_path is needed to limit the effects of
1537
`SET LOCAL search_path` to the current function */
1538
BEGIN
1539
	PERFORM util.use_schema(schema_anchor);
1540
	
1541
	PERFORM util.recreate_view('"plot.**"', $1);
1542
END;
1543
$_$;
1544

  
1545

  
1546
ALTER FUNCTION "public.test_taxonomic_names"."plot.**.modify"(view_query text, schema_anchor anyelement) OWNER TO bien;
1547

  
1548
--
1549
-- Name: FUNCTION "plot.**.modify"(view_query text, schema_anchor anyelement); Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
1550
--
1551

  
1552
COMMENT ON FUNCTION "plot.**.modify"(view_query text, schema_anchor anyelement) IS '
1553
usage:
1554
SELECT "plot.**.modify"($$
1555
SELECT __
1556
$$);
1557

  
1558
idempotent
1559
';
1560

  
1561

  
1562
--
1460 1563
-- Name: project_contributors(integer); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
1461 1564
--
1462 1565

  
......
1483 1586

  
1484 1587

  
1485 1588
--
1589
-- Name: provider_count_view_modify(); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
1590
--
1591

  
1592
CREATE FUNCTION provider_count_view_modify() RETURNS void
1593
    LANGUAGE sql
1594
    AS $$
1595
DROP TABLE IF EXISTS provider_count;
1596
SELECT util.copy('provider_count_view', 'provider_count');
1597

  
1598
GRANT SELECT ON TABLE provider_count TO bien_read;
1599
GRANT SELECT ON TABLE provider_count TO public_;
1600
GRANT SELECT ON TABLE provider_count_view TO bien_read;
1601
GRANT SELECT ON TABLE provider_count_view TO public_;
1602

  
1603
ALTER TABLE provider_count ADD PRIMARY KEY (dataprovider, dataset);
1604
$$;
1605

  
1606

  
1607
ALTER FUNCTION "public.test_taxonomic_names".provider_count_view_modify() OWNER TO bien;
1608

  
1609
--
1486 1610
-- Name: public_schema_publish(text); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
1487 1611
--
1488 1612

  
......
1657 1781
ALTER FUNCTION "public.test_taxonomic_names".sourcename_set_matched_source_id() OWNER TO bien;
1658 1782

  
1659 1783
--
1660
-- Name: sync_analytical_stem_to_view(); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
1784
-- Name: taxon_trait_view_modify(); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
1661 1785
--
1662 1786

  
1663
CREATE FUNCTION sync_analytical_stem_to_view() RETURNS void
1787
CREATE FUNCTION taxon_trait_view_modify() RETURNS void
1664 1788
    LANGUAGE sql
1665
    AS $_$
1666
SELECT util.recreate($$
1667
DROP TABLE IF EXISTS analytical_stem;
1668
CREATE TABLE analytical_stem AS SELECT * FROM analytical_stem_view LIMIT 0;
1669
ALTER TABLE analytical_stem ADD COLUMN taxon_occurrence__pkey serial PRIMARY KEY;
1670

  
1671
GRANT SELECT ON TABLE analytical_stem TO bien_read;
1672
GRANT SELECT ON TABLE analytical_stem_view TO bien_read;
1673

  
1674
ALTER TABLE analytical_stem ALTER COLUMN "datasource" SET NOT NULL;
1675
ALTER TABLE analytical_stem ALTER COLUMN "locationID" SET NOT NULL;
1676

  
1677
CREATE INDEX ON analytical_stem ("datasource", "occurrenceID");
1678
CREATE INDEX ON analytical_stem ("datasource", "specimenHolderInstitutions", "collection", "accessionNumber");
1679
CREATE INDEX ON analytical_stem ("datasource", "projectID", "locationID", "eventDate");
1680
CREATE INDEX ON analytical_stem ("scrubbed_morphospecies_binomial");
1681
$$);
1682
$_$;
1683

  
1684

  
1685
ALTER FUNCTION "public.test_taxonomic_names".sync_analytical_stem_to_view() OWNER TO bien;
1686

  
1687
--
1688
-- Name: sync_geoscrub_input_to_view(); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
1689
--
1690

  
1691
CREATE FUNCTION sync_geoscrub_input_to_view() RETURNS void
1692
    LANGUAGE sql
1693 1789
    AS $$
1694
DROP TABLE IF EXISTS geoscrub_input;
1695
CREATE TABLE geoscrub_input AS SELECT * FROM geoscrub_input_view;
1696

  
1697
GRANT SELECT ON TABLE geoscrub_input TO bien_read;
1698
GRANT SELECT ON TABLE geoscrub_input_view TO bien_read;
1699
$$;
1700

  
1701

  
1702
ALTER FUNCTION "public.test_taxonomic_names".sync_geoscrub_input_to_view() OWNER TO bien;
1703

  
1704
--
1705
-- Name: sync_provider_count_to_view(); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
1706
--
1707

  
1708
CREATE FUNCTION sync_provider_count_to_view() RETURNS void
1709
    LANGUAGE sql
1710
    AS $$
1711
DROP TABLE IF EXISTS provider_count;
1712
CREATE TABLE provider_count AS SELECT * FROM provider_count_view LIMIT 0;
1713

  
1714
GRANT SELECT ON TABLE provider_count TO bien_read;
1715
GRANT SELECT ON TABLE provider_count TO public_;
1716
GRANT SELECT ON TABLE provider_count_view TO bien_read;
1717
GRANT SELECT ON TABLE provider_count_view TO public_;
1718

  
1719
ALTER TABLE provider_count ADD PRIMARY KEY (dataprovider, dataset);
1720
$$;
1721

  
1722

  
1723
ALTER FUNCTION "public.test_taxonomic_names".sync_provider_count_to_view() OWNER TO bien;
1724

  
1725
--
1726
-- Name: sync_taxon_trait_to_view(); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
1727
--
1728

  
1729
CREATE FUNCTION sync_taxon_trait_to_view() RETURNS void
1730
    LANGUAGE sql
1731
    AS $$
1732 1790
DROP TABLE IF EXISTS taxon_trait;
1733
CREATE TABLE taxon_trait AS SELECT * FROM taxon_trait_view LIMIT 0;
1791
SELECT util.copy('taxon_trait_view', 'taxon_trait');
1734 1792

  
1735 1793
GRANT SELECT ON TABLE taxon_trait TO bien_read;
1736 1794
GRANT SELECT ON TABLE taxon_trait_view TO bien_read;
......
1742 1800
$$;
1743 1801

  
1744 1802

  
1745
ALTER FUNCTION "public.test_taxonomic_names".sync_taxon_trait_to_view() OWNER TO bien;
1803
ALTER FUNCTION "public.test_taxonomic_names".taxon_trait_view_modify() OWNER TO bien;
1746 1804

  
1747 1805
--
1748 1806
-- Name: taxondetermination_set_iscurrent(integer); Type: FUNCTION; Schema: public.test_taxonomic_names; Owner: bien
......
2144 2202
--
2145 2203

  
2146 2204
CREATE TABLE analytical_stem (
2147
    datasource text NOT NULL,
2148
    country text,
2149
    "stateProvince" text,
2150
    county text,
2151
    locality text,
2152
    "decimalLatitude" double precision,
2153
    "decimalLongitude" double precision,
2154
    "coordinateUncertaintyInMeters" double precision,
2155
    "coordinateSource_bien" coordinatesource,
2156
    "georeferenceProtocol_bien" text,
2205
    "datasource__@Brad__.identifier_examples@vegpath.org" text NOT NULL,
2206
    "country__@DwC__@vegpath.org" text,
2207
    "stateProvince__@DwC__@vegpath.org" text,
2208
    "county__@DwC__@vegpath.org" text,
2209
    "locality__@DwC__@vegpath.org" text,
2210
    "decimalLatitude__@DwC__@vegpath.org" double precision,
2211
    "decimalLongitude__@DwC__@vegpath.org" double precision,
2212
    "coordinateUncertaintyInMeters__@DwC__@vegpath.org" double precision,
2213
    "georeferenceSources__@DwC__@vegpath.org" coordinatesource,
2214
    "georeferenceProtocol__@DwC__@vegpath.org" text,
2157 2215
    geovalid_bien integer,
2158 2216
    "isNewWorld_bien" integer,
2159
    "projectID" text,
2160
    project_contributors text[],
2161
    "locationID" text NOT NULL,
2162
    "locationName" text,
2163
    subplot text,
2217
    "projectID__@VegX__.plotObservation@vegpath.org" text,
2218
    "projectContributor[s]__@VegBank__@vegpath.org" text[],
2219
    "locationID__@DwC__@vegpath.org" text NOT NULL,
2220
    "plotName__@VegX__.plot@vegpath.org" text,
2221
    "subplot__@SALVIAS__.Plot_data@vegpath.org" text,
2164 2222
    location__cultivated__bien boolean,
2165
    locationevent__pkey integer,
2166
    "eventDate" date,
2167
    "elevationInMeters" double precision,
2168
    "slopeAspect" double precision,
2169
    "slopeGradient" double precision,
2170
    "plotArea_ha" double precision,
2171
    "samplingProtocol" text,
2172
    "temperature_C" double precision,
2173
    precipitation_m double precision,
2174
    stratum__name text,
2175
    communities text[],
2176
    plot__collectors text[],
2177
    "specimenHolderInstitutions" text,
2178
    collection text,
2179
    "accessionNumber" text,
2180
    "occurrenceID" text,
2181
    "recordedBy" text,
2182
    "recordNumber" text,
2183
    "dateCollected" date,
2184
    family_verbatim text,
2185
    "scientificName_verbatim" text,
2186
    "identifiedBy" text,
2187
    "dateIdentified" date,
2188
    "identificationRemarks" text,
2189
    family_matched text,
2190
    "taxonName_matched" text,
2191
    "scientificNameAuthorship_matched" text,
2192
    "higherPlantGroup_bien" higher_plant_group,
2193
    taxonomic_status text,
2223
    "locationevent.locationevent_id__@VegBIEN__.public@vegpath.org" integer,
2224
    "eventDate__@DwC__@vegpath.org" date,
2225
    "(-minimum-)ElevationInMeters__@DwC__@vegpath.org" double precision,
2226
    "slopeAspect[_deg]__@VegX__.plot@vegpath.org" double precision,
2227
    "slopeGradient[_deg]__@VegX__.plot@vegpath.org" double precision,
2228
    "plot.area[_ha]__@VegX__@vegpath.org" double precision,
2229
    "samplingProtocol__@DwC__@vegpath.org" text,
2230
    "temperature[_C]__@VegX__.plotObs.obsCond@vegpath.org" double precision,
2231
    "precip_mm__@SALVIAS__.Plot_metadata@vegpath.org" double precision,
2232
    "stratumName__@VegX__.stratum@vegpath.org" text,
2233
    "communityConcept.name__@VegX__.communityDet@vegpath.org" text[],
2234
    "observationContributor[s]__@VegBank__@vegpath.org" text[],
2235
    "[custodial_]institutionCode[s]__@DwC__@vegpath.org" text,
2236
    "collectionCode__@DwC__@vegpath.org" text,
2237
    "catalogNumber__@DwC__@vegpath.org" text,
2238
    "occurrenceID__@DwC__@vegpath.org" text,
2239
    "recordedBy__@DwC__@vegpath.org" text,
2240
    "recordNumber__@DwC__@vegpath.org" text,
2241
    "(-Earliest-)DateCollected__-2007-04-17__@DwC__.hist@vegpath.org" date,
2242
    "[verbatim_]family__@DwC__@vegpath.org" text,
2243
    "[verbatim_]scientificName__@DwC__@vegpath.org" text,
2244
    "identifiedBy__@DwC__@vegpath.org" text,
2245
    "dateIdentified__@DwC__@vegpath.org" date,
2246
    "identificationRemarks__@DwC__@vegpath.org" text,
2247
    "Family_matched__@TNRS__@vegpath.org" text,
2248
    "Name_matched__@TNRS__@vegpath.org" text,
2249
    "Name_matched_author__@TNRS__@vegpath.org" text,
2250
    "[higher_plant_group~]higherClassification__@DwC__@vegpath.org" higher_plant_group,
2251
    "taxonomicStatus__@DwC__@vegpath.org" text,
2194 2252
    scrubbed_family text,
2195 2253
    scrubbed_genus text,
2196 2254
    scrubbed_specific_epithet text,
......
2198 2256
    scrubbed_taxon_name_no_author text,
2199 2257
    scrubbed_author text,
2200 2258
    scrubbed_taxon_name_with_author text,
2201
    scrubbed_morphospecies_binomial text,
2202
    "growthForm" growthform,
2203
    "reproductiveCondition" text,
2259
    "speciesBinomialWithMorphospecies__@VegCore__@vegpath.org" text,
2260
    "[growth_form=]habit__@SALVIAS__.Plot_data@vegpath.org" growthform,
2261
    "reproductiveCondition__@DwC__@vegpath.org" text,
2204 2262
    threatened_bien integer,
2205 2263
    cultivated_bien integer,
2206 2264
    "cultivatedBasis_bien" text,
2207
    "occurrenceRemarks" text,
2208
    "coverPercent" double precision,
2209
    "diameterBreastHeight_cm" double precision,
2210
    height_m double precision,
2211
    tag text,
2212
    "organismX_m" double precision,
2213
    "organismY_m" double precision,
2214
    "taxonOccurrenceID" text,
2215
    "authorTaxonCode" text,
2216
    "aggregateOrganismObservationID" text,
2217
    "individualObservationID" text,
2218
    "individualCode" text,
2219
    "individualCount" integer,
2220
    "authorStemCode" text,
2221
    taxon_occurrence__pkey integer NOT NULL
2265
    "occurrenceRemarks__@DwC__@vegpath.org" text,
2266
    "coverPercent__@VegX__.attribute.ordinal@vegpath.org" double precision,
2267
    "stem_dbh[_cm]__@SALVIAS__.Plot_data@vegpath.org" double precision,
2268
    "stemHeight[_m]__@VegBank__.stemCount@vegpath.org" double precision,
2269
    "[tag=]identificationLabel__@VegX__.individual@vegpath.org" text,
2270
    "relativeX[_m]__@VegX__.individualOrganismObs@vegpath.org" double precision,
2271
    "relativeY[_m]__@VegX__.individualOrganismObs@vegpath.org" double precision,
2272
    "taxonObservation[.id]__@VegBank__@vegpath.org" text,
2273
    "taxonNameUsageConcept.authorCode__@VegX__@vegpath.org" text,
2274
    "aggregateOrganismObservation.id__@VegX__@vegpath.org" text,
2275
    "individualOrganismObservation.id__@VegX__@vegpath.org" text,
2276
    "individualID__@DwC__@vegpath.org" text,
2277
    "individualCount__@DwC__@vegpath.org" integer,
2278
    "stemCode__@VegBank__.stemLocation@vegpath.org" text,
2279
    "TAXONOBSERVATION_ID__@VegBank__.taxonObservation@vegpath.org" integer NOT NULL
2222 2280
);
2223 2281

  
2224 2282

  
2225 2283
ALTER TABLE "public.test_taxonomic_names".analytical_stem OWNER TO bien;
2226 2284

  
2227 2285
--
2286
-- Name: COLUMN analytical_stem."datasource__@Brad__.identifier_examples@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2287
--
2288

  
2289
COMMENT ON COLUMN analytical_stem."datasource__@Brad__.identifier_examples@vegpath.org" IS '"the person [or] institution that provided the data [to this database] (the *proximate* data provider)"';
2290

  
2291

  
2292
--
2293
-- Name: COLUMN analytical_stem."country__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2294
--
2295

  
2296
COMMENT ON COLUMN analytical_stem."country__@DwC__@vegpath.org" IS 'http://geoscrub.geoscrub_output.acceptedCountry__@VegBIEN__@vegpath.org;
2297
"The name of the country or major administrative unit in which the Location occurs"';
2298

  
2299

  
2300
--
2301
-- Name: COLUMN analytical_stem."stateProvince__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2302
--
2303

  
2304
COMMENT ON COLUMN analytical_stem."stateProvince__@DwC__@vegpath.org" IS '"The name of the next smaller administrative region than country (state, province, canton, department, region, etc.) in which the Location occurs"';
2305

  
2306

  
2307
--
2308
-- Name: COLUMN analytical_stem."county__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2309
--
2310

  
2311
COMMENT ON COLUMN analytical_stem."county__@DwC__@vegpath.org" IS '"The full, unabbreviated name of the next smaller administrative region than stateProvince (county, shire, department, etc.) in which the Location occurs"';
2312

  
2313

  
2314
--
2315
-- Name: COLUMN analytical_stem."locality__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2316
--
2317

  
2318
COMMENT ON COLUMN analytical_stem."locality__@DwC__@vegpath.org" IS '"The specific description of the place"';
2319

  
2320

  
2321
--
2322
-- Name: COLUMN analytical_stem."decimalLatitude__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2323
--
2324

  
2325
COMMENT ON COLUMN analytical_stem."decimalLatitude__@DwC__@vegpath.org" IS '"The geographic latitude (in decimal degrees, using the spatial reference system given in geodeticDatum) of the geographic center of a Location"';
2326

  
2327

  
2328
--
2329
-- Name: COLUMN analytical_stem."decimalLongitude__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2330
--
2331

  
2332
COMMENT ON COLUMN analytical_stem."decimalLongitude__@DwC__@vegpath.org" IS '"The geographic longitude (in decimal degrees, using the spatial reference system given in geodeticDatum) of the geographic center of a Location"';
2333

  
2334

  
2335
--
2336
-- Name: COLUMN analytical_stem."coordinateUncertaintyInMeters__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2337
--
2338

  
2339
COMMENT ON COLUMN analytical_stem."coordinateUncertaintyInMeters__@DwC__@vegpath.org" IS 'for a point observation, this is the fuzziness of the coordinates. for a plot (or other shape), this is the radius of the circle that circumscribes the entire plot, or the fuzziness, whichever is greater. note that the DwC definition is confusingly worded: it uses the ambiguous term Location, which sometimes refers to the asserted named place, but which they intended to refer to the plot or point.';
2340

  
2341

  
2342
--
2343
-- Name: COLUMN analytical_stem."georeferenceSources__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2344
--
2345

  
2346
COMMENT ON COLUMN analytical_stem."georeferenceSources__@DwC__@vegpath.org" IS '"A list (concatenated and separated) of maps, gazetteers, or other resources used to georeference the Location, described specifically enough to allow anyone in the future to use the same resources"';
2347

  
2348

  
2349
--
2350
-- Name: COLUMN analytical_stem."georeferenceProtocol__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2351
--
2352

  
2353
COMMENT ON COLUMN analytical_stem."georeferenceProtocol__@DwC__@vegpath.org" IS '"A description or reference to the methods used to determine the spatial footprint, coordinates, and uncertainties"';
2354

  
2355

  
2356
--
2357
-- Name: COLUMN analytical_stem.geovalid_bien; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2358
--
2359

  
2360
COMMENT ON COLUMN analytical_stem.geovalid_bien IS 'whether the coordinates are within the boundary of the asserted named places';
2361

  
2362

  
2363
--
2364
-- Name: COLUMN analytical_stem."isNewWorld_bien"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2365
--
2366

  
2367
COMMENT ON COLUMN analytical_stem."isNewWorld_bien" IS 'whether the country is in the Americas';
2368

  
2369

  
2370
--
2371
-- Name: COLUMN analytical_stem."projectID__@VegX__.plotObservation@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2372
--
2373

  
2374
COMMENT ON COLUMN analytical_stem."projectID__@VegX__.plotObservation@vegpath.org" IS 'http://project.sourceaccessioncode__@VegBIEN__.public@vegpath.org;
2375
"A reference to a specific ''project''"';
2376

  
2377

  
2378
--
2379
-- Name: COLUMN analytical_stem."projectContributor[s]__@VegBank__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2380
--
2381

  
2382
COMMENT ON COLUMN analytical_stem."projectContributor[s]__@VegBank__@vegpath.org" IS '"intersection entit[ies] used to ''link'' a party with a specific project wherein vegetation plots are described"';
2383

  
2384

  
2385
--
2386
-- Name: COLUMN analytical_stem."locationID__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2387
--
2388

  
2389
COMMENT ON COLUMN analytical_stem."locationID__@DwC__@vegpath.org" IS '"An identifier for the set of location information (data associated with dcterms:Location)"';
2390

  
2391

  
2392
--
2393
-- Name: COLUMN analytical_stem."plotName__@VegX__.plot@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2394
--
2395

  
2396
COMMENT ON COLUMN analytical_stem."plotName__@VegX__.plot@vegpath.org" IS '"Name or label for a plot"';
2397

  
2398

  
2399
--
2400
-- Name: COLUMN analytical_stem."subplot__@SALVIAS__.Plot_data@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2401
--
2402

  
2403
COMMENT ON COLUMN analytical_stem."subplot__@SALVIAS__.Plot_data@vegpath.org" IS 'http://location.authorlocationcode__@VegBIEN__.public@vegpath.org;
2404
"Code for subplot, line, or any other subsample or subdivision of plot"';
2405

  
2406

  
2407
--
2408
-- Name: COLUMN analytical_stem.location__cultivated__bien; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2409
--
2410

  
2411
COMMENT ON COLUMN analytical_stem.location__cultivated__bien IS 'whether the occurrence''s *location* was flagged as cultivated. note that this refers just to the cultivated status of the *location*; the occurrence may be cultivated even if the location isn''t.';
2412

  
2413

  
2414
--
2415
-- Name: COLUMN analytical_stem."locationevent.locationevent_id__@VegBIEN__.public@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2416
--
2417

  
2418
COMMENT ON COLUMN analytical_stem."locationevent.locationevent_id__@VegBIEN__.public@vegpath.org" IS 'http://locationevent.locationevent_id__@VegBIEN__.public@vegpath.org;
2419
autogenerated ID for locationevent';
2420

  
2421

  
2422
--
2423
-- Name: COLUMN analytical_stem."eventDate__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2424
--
2425

  
2426
COMMENT ON COLUMN analytical_stem."eventDate__@DwC__@vegpath.org" IS '"The date-time or interval during which an Event occurred. For occurrences, this is the date-time when the event was recorded."';
2427

  
2428

  
2429
--
2430
-- Name: COLUMN analytical_stem."(-minimum-)ElevationInMeters__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2431
--
2432

  
2433
COMMENT ON COLUMN analytical_stem."(-minimum-)ElevationInMeters__@DwC__@vegpath.org" IS 'the "elevation (altitude, usually above sea level), in meters"';
2434

  
2435

  
2436
--
2437
-- Name: COLUMN analytical_stem."slopeAspect[_deg]__@VegX__.plot@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2438
--
2439

  
2440
COMMENT ON COLUMN analytical_stem."slopeAspect[_deg]__@VegX__.plot@vegpath.org" IS '"Representative azimuth of slope gradient (0-360 degrees) or as a cardinal direction (e.g. N, S, NE)"';
2441

  
2442

  
2443
--
2444
-- Name: COLUMN analytical_stem."slopeGradient[_deg]__@VegX__.plot@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2445
--
2446

  
2447
COMMENT ON COLUMN analytical_stem."slopeGradient[_deg]__@VegX__.plot@vegpath.org" IS '"Representative inclination of slope in degrees"';
2448

  
2449

  
2450
--
2451
-- Name: COLUMN analytical_stem."plot.area[_ha]__@VegX__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2452
--
2453

  
2454
COMMENT ON COLUMN analytical_stem."plot.area[_ha]__@VegX__@vegpath.org" IS '"Total area of the plot"';
2455

  
2456

  
2457
--
2458
-- Name: COLUMN analytical_stem."samplingProtocol__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2459
--
2460

  
2461
COMMENT ON COLUMN analytical_stem."samplingProtocol__@DwC__@vegpath.org" IS '"The name of, reference to, or description of the method or protocol used during an Event"';
2462

  
2463

  
2464
--
2465
-- Name: COLUMN analytical_stem."temperature[_C]__@VegX__.plotObs.obsCond@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2466
--
2467

  
2468
COMMENT ON COLUMN analytical_stem."temperature[_C]__@VegX__.plotObs.obsCond@vegpath.org" IS '"Temperature during observation [...] [in] Celsius"';
2469

  
2470

  
2471
--
2472
-- Name: COLUMN analytical_stem."precip_mm__@SALVIAS__.Plot_metadata@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2473
--
2474

  
2475
COMMENT ON COLUMN analytical_stem."precip_mm__@SALVIAS__.Plot_metadata@vegpath.org" IS '"Total annual precipitation, in mm"';
2476

  
2477

  
2478
--
2479
-- Name: COLUMN analytical_stem."stratumName__@VegX__.stratum@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2480
--
2481

  
2482
COMMENT ON COLUMN analytical_stem."stratumName__@VegX__.stratum@vegpath.org" IS '"Name associated with this stratum"';
2483

  
2484

  
2485
--
2486
-- Name: COLUMN analytical_stem."communityConcept.name__@VegX__.communityDet@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2487
--
2488

  
2489
COMMENT ON COLUMN analytical_stem."communityConcept.name__@VegX__.communityDet@vegpath.org" IS '"A textual label for a community type. A community type is an abstract grouping of organisms that tend to co-occur on the landscape due to shared ecological requirements or preferences."';
2490

  
2491

  
2492
--
2493
-- Name: COLUMN analytical_stem."observationContributor[s]__@VegBank__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2494
--
2495

  
2496
COMMENT ON COLUMN analytical_stem."observationContributor[s]__@VegBank__@vegpath.org" IS '"intersection[s] that link[] a party with a specific plot observation event"';
2497

  
2498

  
2499
--
2500
-- Name: COLUMN analytical_stem."[custodial_]institutionCode[s]__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2501
--
2502

  
2503
COMMENT ON COLUMN analytical_stem."[custodial_]institutionCode[s]__@DwC__@vegpath.org" IS '"The name[s] (or acronym[s]) in use by the institution[s] having custody of the object(s) or information referred to in the record"';
2504

  
2505

  
2506
--
2507
-- Name: COLUMN analytical_stem."collectionCode__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2508
--
2509

  
2510
COMMENT ON COLUMN analytical_stem."collectionCode__@DwC__@vegpath.org" IS '"The name, acronym, coden, or initialism identifying the collection or data set from which the record was derived"';
2511

  
2512

  
2513
--
2514
-- Name: COLUMN analytical_stem."catalogNumber__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2515
--
2516

  
2517
COMMENT ON COLUMN analytical_stem."catalogNumber__@DwC__@vegpath.org" IS '"An identifier (preferably unique) for the record within the data set or collection"';
2518

  
2519

  
2520
--
2521
-- Name: COLUMN analytical_stem."occurrenceID__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2522
--
2523

  
2524
COMMENT ON COLUMN analytical_stem."occurrenceID__@DwC__@vegpath.org" IS '"An identifier for the Occurrence (as opposed to a particular digital record of the occurrence). In the absence of a persistent global unique identifier, construct one from a combination of identifiers in the record that will most closely make the occurrenceID globally unique."';
2525

  
2526

  
2527
--
2528
-- Name: COLUMN analytical_stem."recordedBy__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2529
--
2530

  
2531
COMMENT ON COLUMN analytical_stem."recordedBy__@DwC__@vegpath.org" IS '"A list (concatenated and separated) of names of people, groups, or organizations responsible for recording the original Occurrence. The primary collector or observer, especially one who applies a personal identifier (recordNumber), should be listed first."';
2532

  
2533

  
2534
--
2535
-- Name: COLUMN analytical_stem."recordNumber__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2536
--
2537

  
2538
COMMENT ON COLUMN analytical_stem."recordNumber__@DwC__@vegpath.org" IS '"An identifier given to the Occurrence at the time it was recorded. Often serves as a link between field notes and an Occurrence record, such as a specimen collector''s number."';
2539

  
2540

  
2541
--
2542
-- Name: COLUMN analytical_stem."(-Earliest-)DateCollected__-2007-04-17__@DwC__.hist@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2543
--
2544

  
2545
COMMENT ON COLUMN analytical_stem."(-Earliest-)DateCollected__-2007-04-17__@DwC__.hist@vegpath.org" IS 'the "date-time (Common Era calendar) in a date-time period during which an organism or group of organisms was collected or observed"';
2546

  
2547

  
2548
--
2549
-- Name: COLUMN analytical_stem."[verbatim_]family__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2550
--
2551

  
2552
COMMENT ON COLUMN analytical_stem."[verbatim_]family__@DwC__@vegpath.org" IS '"The full scientific name of the family in which the taxon is classified [*before* any TNRS scrubbing]"';
2553

  
2554

  
2555
--
2556
-- Name: COLUMN analytical_stem."[verbatim_]scientificName__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2557
--
2558

  
2559
COMMENT ON COLUMN analytical_stem."[verbatim_]scientificName__@DwC__@vegpath.org" IS '"The full scientific name [*before* any TNRS scrubbing], with authorship and date information if known. When forming part of an Identification, this should be the name in lowest level taxonomic rank that can be determined."';
2560

  
2561

  
2562
--
2563
-- Name: COLUMN analytical_stem."identifiedBy__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2564
--
2565

  
2566
COMMENT ON COLUMN analytical_stem."identifiedBy__@DwC__@vegpath.org" IS '"A list (concatenated and separated) of names of people, groups, or organizations who assigned the Taxon to the subject"';
2567

  
2568

  
2569
--
2570
-- Name: COLUMN analytical_stem."dateIdentified__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2571
--
2572

  
2573
COMMENT ON COLUMN analytical_stem."dateIdentified__@DwC__@vegpath.org" IS '"The date on which the subject was identified as representing the Taxon"';
2574

  
2575

  
2576
--
2577
-- Name: COLUMN analytical_stem."identificationRemarks__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2578
--
2579

  
2580
COMMENT ON COLUMN analytical_stem."identificationRemarks__@DwC__@vegpath.org" IS '"Comments or notes about the Identification"';
2581

  
2582

  
2583
--
2584
-- Name: COLUMN analytical_stem."Family_matched__@TNRS__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2585
--
2586

  
2587
COMMENT ON COLUMN analytical_stem."Family_matched__@TNRS__@vegpath.org" IS 'http://TNRS.taxon_scrub.matchedFamily__@VegBIEN__.public@vegpath.org;
2588
"The closest matching family in the TNRS database to the family submitted"';
2589

  
2590

  
2591
--
2592
-- Name: COLUMN analytical_stem."Name_matched__@TNRS__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2593
--
2594

  
2595
COMMENT ON COLUMN analytical_stem."Name_matched__@TNRS__@vegpath.org" IS '"Scientific name with the highest match score. May be an exact match or a fuzzy match."';
2596

  
2597

  
2598
--
2599
-- Name: COLUMN analytical_stem."Name_matched_author__@TNRS__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2600
--
2601

  
2602
COMMENT ON COLUMN analytical_stem."Name_matched_author__@TNRS__@vegpath.org" IS '"Standard authority for the matched name"';
2603

  
2604

  
2605
--
2606
-- Name: COLUMN analytical_stem."[higher_plant_group~]higherClassification__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2607
--
2608

  
2609
COMMENT ON COLUMN analytical_stem."[higher_plant_group~]higherClassification__@DwC__@vegpath.org" IS 'closed list derived from higher taxa';
2610

  
2611

  
2612
--
2613
-- Name: COLUMN analytical_stem."taxonomicStatus__@DwC__@vegpath.org"; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2614
--
2615

  
2616
COMMENT ON COLUMN analytical_stem."taxonomicStatus__@DwC__@vegpath.org" IS '"The status of the use of the scientificName as a label for a taxon. Requires taxonomic opinion to define the scope of a taxon. [...] Examples: "invalid", "misapplied", "homotypic synonym", "accepted"."';
2617

  
2618

  
2619
--
2620
-- Name: COLUMN analytical_stem.scrubbed_family; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2621
--
2622

  
2623
COMMENT ON COLUMN analytical_stem.scrubbed_family IS 'the family of the TNRS accepted or matched name';
2624

  
2625

  
2626
--
2627
-- Name: COLUMN analytical_stem.scrubbed_genus; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2628
--
2629

  
2630
COMMENT ON COLUMN analytical_stem.scrubbed_genus IS 'the genus of the TNRS accepted or matched name';
2631

  
2632

  
2633
--
2634
-- Name: COLUMN analytical_stem.scrubbed_specific_epithet; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2635
--
2636

  
2637
COMMENT ON COLUMN analytical_stem.scrubbed_specific_epithet IS 'the specific epithet of the TNRS accepted or matched name';
2638

  
2639

  
2640
--
2641
-- Name: COLUMN analytical_stem.scrubbed_species_binomial; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2642
--
2643

  
2644
COMMENT ON COLUMN analytical_stem.scrubbed_species_binomial IS 'the species binomial of the TNRS accepted or matched name';
2645

  
2646

  
2647
--
2648
-- Name: COLUMN analytical_stem.scrubbed_taxon_name_no_author; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
2649
--
2650

  
2651
COMMENT ON COLUMN analytical_stem.scrubbed_taxon_name_no_author IS 'the taxon name without author of the TNRS accepted or matched name';
2652

  
2653

  
2654
--
2655
-- Name: COLUMN analytical_stem.scrubbed_author; Type: COMMENT; Schema: public.test_taxonomic_names; Owner: bien
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff