Revision 9914
Added by Aaron Marcuse-Kubitza over 11 years ago
schema.sql | ||
---|---|---|
76 | 76 |
(CASE |
77 | 77 |
WHEN new."Infraspecific_epithet_matched" IS NOT NULL |
78 | 78 |
OR new."Infraspecific_epithet_2_matched" IS NOT NULL |
79 |
OR new."Specific_epithet_score"::double precision >= 0.9 -- fuzzy match
|
|
79 |
OR new."Specific_epithet_score" >= 0.9 -- fuzzy match |
|
80 | 80 |
THEN true |
81 | 81 |
ELSE NULL -- ambiguous |
82 | 82 |
END); |
... | ... | |
87 | 87 |
, new."Accepted_name_author" |
88 | 88 |
), ''); |
89 | 89 |
new."Max_score" = GREATEST( |
90 |
new."Overall_score"::double precision
|
|
91 |
, new."Family_score"::double precision
|
|
92 |
, new."Genus_score"::double precision
|
|
93 |
, new."Specific_epithet_score"::double precision
|
|
90 |
new."Overall_score" |
|
91 |
, new."Family_score" |
|
92 |
, new."Genus_score" |
|
93 |
, new."Specific_epithet_score" |
|
94 | 94 |
); |
95 | 95 |
new."Is_plant" = (CASE |
96 |
WHEN new."Family_score"::double precision = 1 THEN true -- exact match
|
|
96 |
WHEN new."Family_score" = 1 THEN true -- exact match |
|
97 | 97 |
ELSE -- Family_matched IS NULL |
98 | 98 |
(CASE |
99 |
WHEN new."Genus_score"::double precision = 1 -- exact match
|
|
99 |
WHEN new."Genus_score" = 1 -- exact match |
|
100 | 100 |
THEN "Specific_epithet_is_plant" |
101 |
WHEN new."Genus_score"::double precision >= 0.85 -- fuzzy match
|
|
101 |
WHEN new."Genus_score" >= 0.85 -- fuzzy match |
|
102 | 102 |
THEN "Specific_epithet_is_plant" |
103 | 103 |
ELSE NULL -- ambiguous |
104 | 104 |
END) |
Also available in: Unified diff
inputs/.TNRS/schema.sql: tnrs_populate_fields(): removed no longer needed casts of *_score to double precision