Project

General

Profile

« Previous | Next » 

Revision 14103

inputs/.TNRS/schema.sql: MatchedTaxon: taxonomicStatus: moved outside the inner SELECT so that the inner SELECT would consist solely of renamings

View differences:

trunk/inputs/.TNRS/schema.sql
412 412
    s."*Infraspecific_epithet_score",
413 413
    s."identificationQualifier",
414 414
    s."morphospeciesSuffix",
415
    s."taxonomicStatus",
415
    s."*taxonomicStatus",
416 416
    s.accepted_taxon_name_no_author,
417 417
    s.accepted_author,
418 418
    s.accepted_taxon_rank,
......
425 425
    s."*Accepted_name_lsid",
426 426
    s.taxon_scrub__is_valid_match,
427 427
    s.scrubbed_unique_taxon_name,
428
    map_taxonomic_status(s."*taxonomicStatus", s.accepted_taxon_name_no_author) AS "taxonomicStatus",
428 429
        CASE
429 430
            WHEN (s.accepted_taxon_rank = 'family'::text) THEN concat_ws(' '::text, s.accepted_family, s."morphospeciesSuffix")
430 431
            WHEN (s.accepted_taxon_rank = 'genus'::text) THEN concat_ws(' '::text, s.accepted_taxon_name_no_author, s."morphospeciesSuffix")
......
448 449
            taxon_best_match."Infraspecific_epithet_score" AS "*Infraspecific_epithet_score",
449 450
            taxon_best_match."Annotations" AS "identificationQualifier",
450 451
            taxon_best_match."Unmatched_terms" AS "morphospeciesSuffix",
451
            map_taxonomic_status(taxon_best_match."Taxonomic_status", taxon_best_match."Accepted_name") AS "taxonomicStatus",
452
            taxon_best_match."Taxonomic_status" AS "*taxonomicStatus",
452 453
            taxon_best_match."Accepted_name" AS accepted_taxon_name_no_author,
453 454
            taxon_best_match."Accepted_name_author" AS accepted_author,
454 455
            taxon_best_match."Accepted_name_rank" AS accepted_taxon_rank,
......
499 500
    "MatchedTaxon"."*Infraspecific_epithet_score",
500 501
    "MatchedTaxon"."identificationQualifier",
501 502
    "MatchedTaxon"."morphospeciesSuffix",
502
    "MatchedTaxon"."taxonomicStatus",
503
    "MatchedTaxon"."*taxonomicStatus",
503 504
    "MatchedTaxon".accepted_taxon_name_no_author,
504 505
    "MatchedTaxon".accepted_author,
505 506
    "MatchedTaxon".accepted_taxon_rank,
......
512 513
    "MatchedTaxon"."*Accepted_name_lsid",
513 514
    "MatchedTaxon".taxon_scrub__is_valid_match,
514 515
    "MatchedTaxon".scrubbed_unique_taxon_name,
516
    "MatchedTaxon"."taxonomicStatus",
515 517
    "MatchedTaxon".accepted_morphospecies_binomial
516 518
   FROM "MatchedTaxon"
517 519
  WHERE "MatchedTaxon".taxon_scrub__is_valid_match;
......
761 763
    "ValidMatchedTaxon"."*Infraspecific_epithet_score",
762 764
    "ValidMatchedTaxon"."identificationQualifier",
763 765
    "ValidMatchedTaxon"."morphospeciesSuffix",
764
    "ValidMatchedTaxon"."taxonomicStatus",
766
    "ValidMatchedTaxon"."*taxonomicStatus",
765 767
    "ValidMatchedTaxon".accepted_taxon_name_no_author,
766 768
    "ValidMatchedTaxon".accepted_author,
767 769
    "ValidMatchedTaxon".accepted_taxon_rank,
......
773 775
    "ValidMatchedTaxon"."*Warnings",
774 776
    "ValidMatchedTaxon"."*Accepted_name_lsid",
775 777
    "ValidMatchedTaxon".taxon_scrub__is_valid_match,
778
    "ValidMatchedTaxon"."taxonomicStatus",
776 779
    "ValidMatchedTaxon".accepted_morphospecies_binomial,
777 780
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_taxon_rank,
778 781
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_family,
trunk/schemas/vegbien.sql
19524 19524
    s."*Infraspecific_epithet_score",
19525 19525
    s."identificationQualifier",
19526 19526
    s."morphospeciesSuffix",
19527
    s."taxonomicStatus",
19527
    s."*taxonomicStatus",
19528 19528
    s.accepted_taxon_name_no_author,
19529 19529
    s.accepted_author,
19530 19530
    s.accepted_taxon_rank,
......
19537 19537
    s."*Accepted_name_lsid",
19538 19538
    s.taxon_scrub__is_valid_match,
19539 19539
    s.scrubbed_unique_taxon_name,
19540
    map_taxonomic_status(s."*taxonomicStatus", s.accepted_taxon_name_no_author) AS "taxonomicStatus",
19540 19541
        CASE
19541 19542
            WHEN (s.accepted_taxon_rank = 'family'::text) THEN concat_ws(' '::text, s.accepted_family, s."morphospeciesSuffix")
19542 19543
            WHEN (s.accepted_taxon_rank = 'genus'::text) THEN concat_ws(' '::text, s.accepted_taxon_name_no_author, s."morphospeciesSuffix")
......
19560 19561
            taxon_best_match."Infraspecific_epithet_score" AS "*Infraspecific_epithet_score",
19561 19562
            taxon_best_match."Annotations" AS "identificationQualifier",
19562 19563
            taxon_best_match."Unmatched_terms" AS "morphospeciesSuffix",
19563
            map_taxonomic_status(taxon_best_match."Taxonomic_status", taxon_best_match."Accepted_name") AS "taxonomicStatus",
19564
            taxon_best_match."Taxonomic_status" AS "*taxonomicStatus",
19564 19565
            taxon_best_match."Accepted_name" AS accepted_taxon_name_no_author,
19565 19566
            taxon_best_match."Accepted_name_author" AS accepted_author,
19566 19567
            taxon_best_match."Accepted_name_rank" AS accepted_taxon_rank,
......
19611 19612
    "MatchedTaxon"."*Infraspecific_epithet_score",
19612 19613
    "MatchedTaxon"."identificationQualifier",
19613 19614
    "MatchedTaxon"."morphospeciesSuffix",
19614
    "MatchedTaxon"."taxonomicStatus",
19615
    "MatchedTaxon"."*taxonomicStatus",
19615 19616
    "MatchedTaxon".accepted_taxon_name_no_author,
19616 19617
    "MatchedTaxon".accepted_author,
19617 19618
    "MatchedTaxon".accepted_taxon_rank,
......
19624 19625
    "MatchedTaxon"."*Accepted_name_lsid",
19625 19626
    "MatchedTaxon".taxon_scrub__is_valid_match,
19626 19627
    "MatchedTaxon".scrubbed_unique_taxon_name,
19628
    "MatchedTaxon"."taxonomicStatus",
19627 19629
    "MatchedTaxon".accepted_morphospecies_binomial
19628 19630
   FROM "MatchedTaxon"
19629 19631
  WHERE "MatchedTaxon".taxon_scrub__is_valid_match;
......
19873 19875
    "ValidMatchedTaxon"."*Infraspecific_epithet_score",
19874 19876
    "ValidMatchedTaxon"."identificationQualifier",
19875 19877
    "ValidMatchedTaxon"."morphospeciesSuffix",
19876
    "ValidMatchedTaxon"."taxonomicStatus",
19878
    "ValidMatchedTaxon"."*taxonomicStatus",
19877 19879
    "ValidMatchedTaxon".accepted_taxon_name_no_author,
19878 19880
    "ValidMatchedTaxon".accepted_author,
19879 19881
    "ValidMatchedTaxon".accepted_taxon_rank,
......
19885 19887
    "ValidMatchedTaxon"."*Warnings",
19886 19888
    "ValidMatchedTaxon"."*Accepted_name_lsid",
19887 19889
    "ValidMatchedTaxon".taxon_scrub__is_valid_match,
19890
    "ValidMatchedTaxon"."taxonomicStatus",
19888 19891
    "ValidMatchedTaxon".accepted_morphospecies_binomial,
19889 19892
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_taxon_rank,
19890 19893
    "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_family,

Also available in: Unified diff