Revision 13503
Added by Aaron Marcuse-Kubitza over 10 years ago
schema.sql | ||
---|---|---|
80 | 80 |
-- Name: map_taxonomic_status(text, text); Type: FUNCTION; Schema: TNRS; Owner: - |
81 | 81 |
-- |
82 | 82 |
|
83 |
CREATE FUNCTION map_taxonomic_status(taxonomic_status_verbatim text, scrubbed_unique_taxon_name text) RETURNS text
|
|
83 |
CREATE FUNCTION map_taxonomic_status(taxonomic_status_verbatim text, accepted_taxon_name_no_author text) RETURNS text
|
|
84 | 84 |
LANGUAGE sql IMMUTABLE |
85 | 85 |
AS $_$ |
86 |
/* from http://wiki.vegpath.org/2013-11-14_conference_call#taxonomic-fields: |
|
87 |
"taxonomic_status should be accepted instead of synonym when an accepted name is |
|
88 |
available (this is not always the case when a name is marked as a synonym)" */ |
|
86 | 89 |
SELECT CASE WHEN $2 IS NOT NULL THEN 'accepted' ELSE lower($1) END |
87 | 90 |
$_$; |
88 | 91 |
|
Also available in: Unified diff
bugfix: inputs/.TNRS/schema.sql: map_taxonomic_status(): need to use accepted name instead of scrubbed name (which also includes no-opinion names), as described at http://wiki.vegpath.org/2013-11-14_conference_call#taxonomic-fields. this used to be the accepted name, but got switched when the concatenated name was also used to store the matched name for no-opinion names.