Revision 13609
Added by Aaron Marcuse-Kubitza over 10 years ago
schema.sql | ||
---|---|---|
58 | 58 |
$$||util.mk_set_relation_metadata('"TNRS"."ValidMatchedTaxon"')||$$ |
59 | 59 |
|
60 | 60 |
CREATE VIEW "TNRS".taxon_scrub AS |
61 |
SELECT * |
|
61 |
SELECT *, |
|
62 |
CASE |
|
63 |
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") |
|
64 |
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") |
|
65 |
ELSE ("taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_genus || ' '::text) || "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_specific_epithet |
|
66 |
END AS scrubbed_morphospecies_binomial |
|
62 | 67 |
FROM "TNRS"."ValidMatchedTaxon" |
63 | 68 |
LEFT JOIN "TNRS"."taxon_scrub.scrubbed_unique_taxon_name.*" USING (scrubbed_unique_taxon_name); |
64 | 69 |
$$||util.mk_set_relation_metadata('"TNRS".taxon_scrub')||$$ |
Also available in: Unified diff
bugfix: inputs/.TNRS/schema.sql: MatchedTaxon_modify(): updated to include taxon_scrub derived fields