Revision 13609
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/inputs/.TNRS/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')||$$ |
trunk/schemas/vegbien.sql | ||
---|---|---|
16848 | 16848 |
$$||util.mk_set_relation_metadata('"TNRS"."ValidMatchedTaxon"')||$$ |
16849 | 16849 |
|
16850 | 16850 |
CREATE VIEW "TNRS".taxon_scrub AS |
16851 |
SELECT * |
|
16851 |
SELECT *, |
|
16852 |
CASE |
|
16853 |
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") |
|
16854 |
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") |
|
16855 |
ELSE ("taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_genus || ' '::text) || "taxon_scrub.scrubbed_unique_taxon_name.*".scrubbed_specific_epithet |
|
16856 |
END AS scrubbed_morphospecies_binomial |
|
16852 | 16857 |
FROM "TNRS"."ValidMatchedTaxon" |
16853 | 16858 |
LEFT JOIN "TNRS"."taxon_scrub.scrubbed_unique_taxon_name.*" USING (scrubbed_unique_taxon_name); |
16854 | 16859 |
$$||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