1
|
CREATE TABLE tnrs
|
2
|
(
|
3
|
"Name_number" text,
|
4
|
"Name_submitted" text NOT NULL,
|
5
|
"Overall_score" text,
|
6
|
"Name_matched" text,
|
7
|
"Name_matched_rank" text,
|
8
|
"Name_score" text,
|
9
|
"Name_matched_author" text,
|
10
|
"Name_matched_url" text,
|
11
|
"Author_matched" text,
|
12
|
"Author_score" text,
|
13
|
"Family_matched" text,
|
14
|
"Family_score" text,
|
15
|
"Name_matched_accepted_family" text,
|
16
|
"Genus_matched" text,
|
17
|
"Genus_score" text,
|
18
|
"Specific_epithet_matched" text,
|
19
|
"Specific_epithet_score" text,
|
20
|
"Infraspecific_rank" text,
|
21
|
"Infraspecific_epithet_matched" text,
|
22
|
"Infraspecific_epithet_score" text,
|
23
|
"Infraspecific_rank_2" text,
|
24
|
"Infraspecific_epithet_2_matched" text,
|
25
|
"Infraspecific_epithet_2_score" text,
|
26
|
"Annotations" text,
|
27
|
"Unmatched_terms" text,
|
28
|
"Taxonomic_status" text,
|
29
|
"Accepted_name" text,
|
30
|
"Accepted_name_author" text,
|
31
|
"Accepted_name_rank" text,
|
32
|
"Accepted_name_url" text,
|
33
|
"Accepted_name_species" text,
|
34
|
"Accepted_name_family" text,
|
35
|
"Selected" text,
|
36
|
"Source" text,
|
37
|
"Warnings" text,
|
38
|
"Accepted_name_lsid" text,
|
39
|
CONSTRAINT tnrs_pkey PRIMARY KEY ("Name_submitted" )
|
40
|
)
|
41
|
WITH (
|
42
|
OIDS=FALSE
|
43
|
);
|
44
|
COMMENT ON TABLE tnrs
|
45
|
IS 'tnrs_accepted_names sorts accepted names first (note that false sorts before true). Accepted names are defined as names that scrub to themselves.';
|
46
|
|
47
|
CREATE INDEX tnrs_accepted_names
|
48
|
ON tnrs
|
49
|
USING btree
|
50
|
((NOT "Name_submitted" = ("Accepted_name" || COALESCE(' '::text || "Accepted_name_author", ''::text))) , "Name_submitted" );
|
51
|
ALTER TABLE tnrs CLUSTER ON tnrs_accepted_names;
|