Project

General

Profile

« Previous | Next » 

Revision 7293

inputs/.TNRS/schema.sql: tnrs: Added Max_score column for use in filtering out names that will be rejected by taxondetermination's constraints

View differences:

schema.sql
38 38
  "Warnings" text,
39 39
  "Accepted_name_lsid" text,
40 40
  "Accepted_scientific_name" text,
41
  "Max_score" double precision,
41 42
  CONSTRAINT tnrs_pkey PRIMARY KEY ("Name_submitted" )
42 43
)
43 44
WITH (
......
53 54
        , new."Accepted_name"
54 55
        , new."Accepted_name_author"
55 56
    ], ' '), '');
57
    new."Max_score" = GREATEST(
58
          new."Overall_score"::double precision
59
        , new."Family_score"::double precision
60
        , new."Genus_score"::double precision
61
        , new."Specific_epithet_score"::double precision
62
    );
56 63
    
57 64
    RETURN new;
58 65
END;
......
108 115
, tnrs_accepted."Warnings"                        AS "Accepted_name.Warnings"
109 116
, tnrs_accepted."Accepted_name_lsid"              AS "Accepted_name.Accepted_name_lsid"
110 117
, tnrs_accepted."Accepted_scientific_name"        AS "Accepted_name.Accepted_scientific_name"
118
, tnrs_accepted."Max_score"                       AS "Accepted_name.Max_score"
111 119
FROM tnrs
112 120
LEFT JOIN tnrs tnrs_accepted ON
113 121
tnrs_accepted."Name_submitted" = tnrs."Accepted_scientific_name"

Also available in: Unified diff