Revision 14376
Added by Aaron Marcuse-Kubitza over 10 years ago
vegbien.sql | ||
---|---|---|
19842 | 19842 |
new.matched_has_accepted = NULL; |
19843 | 19843 |
new."Accepted_family__@TNRS__@vegpath.org" = NULL; |
19844 | 19844 |
new."Accepted_species[_binomial]__@TNRS__@vegpath.org" = NULL; |
19845 |
new."__accepted_{genus,specific_epithet}" = NULL; |
|
19845 |
new."__accepted_{genus,specific_epithet,infra_{rank,epithet}}" = NULL;
|
|
19846 | 19846 |
new."[accepted_]genus__@DwC__@vegpath.org" = NULL; |
19847 | 19847 |
new."[accepted_]specificEpithet__@DwC__@vegpath.org" = NULL; |
19848 | 19848 |
new."[accepted_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org" = NULL; |
... | ... | |
19876 | 19876 |
ELSE NULL::text |
19877 | 19877 |
END) FROM (SELECT new.*) new); |
19878 | 19878 |
new."Accepted_species[_binomial]__@TNRS__@vegpath.org" = (SELECT rtrim("*Accepted_name_species", ' '::text) FROM (SELECT new.*) new); |
19879 |
new."__accepted_{genus,specific_epithet}" = (SELECT regexp_split_to_array("*Accepted_name", ' '::text) FROM (SELECT new.*) new); |
|
19880 |
new."[accepted_]genus__@DwC__@vegpath.org" = (SELECT COALESCE("__accepted_{genus,specific_epithet}"[1], |
|
19879 |
new."__accepted_{genus,specific_epithet,infra_{rank,epithet}}" = (SELECT regexp_split_to_array("*Accepted_name", ' '::text) FROM (SELECT new.*) new);
|
|
19880 |
new."[accepted_]genus__@DwC__@vegpath.org" = (SELECT COALESCE("__accepted_{genus,specific_epithet,infra_{rank,epithet}}"[1],
|
|
19881 | 19881 |
CASE |
19882 | 19882 |
WHEN ("*Accepted_name_rank" = 'genus'::text) THEN "*Accepted_name" |
19883 | 19883 |
ELSE NULL::text |
19884 | 19884 |
END) FROM (SELECT new.*) new); |
19885 |
new."[accepted_]specificEpithet__@DwC__@vegpath.org" = (SELECT "__accepted_{genus,specific_epithet}"[2] FROM (SELECT new.*) new); |
|
19885 |
new."[accepted_]specificEpithet__@DwC__@vegpath.org" = (SELECT "__accepted_{genus,specific_epithet,infra_{rank,epithet}}"[2] FROM (SELECT new.*) new);
|
|
19886 | 19886 |
new."[accepted_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org" = (SELECT CASE |
19887 | 19887 |
WHEN ("*Accepted_name_rank" = 'family'::text) THEN concat_ws(' '::text, "Accepted_family__@TNRS__@vegpath.org", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org") |
19888 | 19888 |
WHEN ("*Accepted_name_rank" = 'genus'::text) THEN concat_ws(' '::text, "[accepted_]genus__@DwC__@vegpath.org", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org") |
... | ... | |
20119 | 20119 |
matched_has_accepted boolean, |
20120 | 20120 |
"Accepted_family__@TNRS__@vegpath.org" text, |
20121 | 20121 |
"Accepted_species[_binomial]__@TNRS__@vegpath.org" text, |
20122 |
"__accepted_{genus,specific_epithet}" text[], |
|
20122 |
"__accepted_{genus,specific_epithet,infra_{rank,epithet}}" text[],
|
|
20123 | 20123 |
"[accepted_]genus__@DwC__@vegpath.org" text, |
20124 | 20124 |
"[accepted_]specificEpithet__@DwC__@vegpath.org" text, |
20125 | 20125 |
"[accepted_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org" text, |
... | ... | |
20147 | 20147 |
END)))), |
20148 | 20148 |
CONSTRAINT "Accepted_species[_binomial]__@TNRS__@vegpath.org" CHECK ((NOT ("Accepted_species[_binomial]__@TNRS__@vegpath.org" IS DISTINCT FROM rtrim("*Accepted_name_species", ' '::text)))), |
20149 | 20149 |
CONSTRAINT "[accepted_]Infraspecific_rank[_abbr]__@TNRS__@vegpath.org" CHECK ((NOT ("[accepted_]Infraspecific_rank[_abbr]__@TNRS__@vegpath.org" IS DISTINCT FROM "__accepted_infraspecific_{rank,epithet}"[1]))), |
20150 |
CONSTRAINT "[accepted_]genus__@DwC__@vegpath.org" CHECK ((NOT ("[accepted_]genus__@DwC__@vegpath.org" IS DISTINCT FROM COALESCE("__accepted_{genus,specific_epithet}"[1], |
|
20150 |
CONSTRAINT "[accepted_]genus__@DwC__@vegpath.org" CHECK ((NOT ("[accepted_]genus__@DwC__@vegpath.org" IS DISTINCT FROM COALESCE("__accepted_{genus,specific_epithet,infra_{rank,epithet}}"[1],
|
|
20151 | 20151 |
CASE |
20152 | 20152 |
WHEN ("*Accepted_name_rank" = 'genus'::text) THEN "*Accepted_name" |
20153 | 20153 |
ELSE NULL::text |
... | ... | |
20160 | 20160 |
ELSE "Accepted_species[_binomial]__@TNRS__@vegpath.org" |
20161 | 20161 |
END))), |
20162 | 20162 |
CONSTRAINT "[accepted_]scientificName[_with_author]__@DwC__@vegpath.org" CHECK ((NOT ("[accepted_]scientificName[_with_author]__@DwC__@vegpath.org" IS DISTINCT FROM ("*Accepted_name" || COALESCE((' '::text || "*Accepted_name_author"), ''::text))))), |
20163 |
CONSTRAINT "[accepted_]specificEpithet__@DwC__@vegpath.org" CHECK ((NOT ("[accepted_]specificEpithet__@DwC__@vegpath.org" IS DISTINCT FROM "__accepted_{genus,specific_epithet}"[2]))), |
|
20163 |
CONSTRAINT "[accepted_]specificEpithet__@DwC__@vegpath.org" CHECK ((NOT ("[accepted_]specificEpithet__@DwC__@vegpath.org" IS DISTINCT FROM "__accepted_{genus,specific_epithet,infra_{rank,epithet}}"[2]))),
|
|
20164 | 20164 |
CONSTRAINT "[matched_]scientificName[_with_author]__@DwC__@vegpath.org" CHECK ((NOT ("[matched_]scientificName[_with_author]__@DwC__@vegpath.org" IS DISTINCT FROM ("matched~Name[_no_author]___@TNRS__@vegpath.org" || COALESCE((' '::text || "*Name_matched_author"), ''::text))))), |
20165 | 20165 |
CONSTRAINT "[matched_]species[_binomial]~(-Accepted_-)__@TNRS__@vegpath.org" CHECK ((NOT ("[matched_]species[_binomial]~(-Accepted_-)__@TNRS__@vegpath.org" IS DISTINCT FROM (("*Genus_matched" || ' '::text) || "*Specific_epithet_matched")))), |
20166 | 20166 |
CONSTRAINT "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org" CHECK ((NOT ("[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org" IS DISTINCT FROM "*Unmatched_terms"))), |
... | ... | |
20223 | 20223 |
CONSTRAINT "[scrubbed_]taxonomicStatus__@DwC__@vegpath.org" CHECK ((NOT ("[scrubbed_]taxonomicStatus__@DwC__@vegpath.org" IS DISTINCT FROM map_taxonomic_status("*Taxonomic_status", "*Accepted_name")))), |
20224 | 20224 |
CONSTRAINT __accepted_infraspecific_label CHECK ((NOT (__accepted_infraspecific_label IS DISTINCT FROM ltrim(NULLIF(remove_prefix("Accepted_species[_binomial]__@TNRS__@vegpath.org", "*Accepted_name", require := true, case_sensitive := false), ''::text), ' '::text)))), |
20225 | 20225 |
CONSTRAINT "__accepted_infraspecific_{rank,epithet}" CHECK ((NOT ("__accepted_infraspecific_{rank,epithet}" IS DISTINCT FROM regexp_split_to_array(__accepted_infraspecific_label, ' '::text)))), |
20226 |
CONSTRAINT "__accepted_{genus,specific_epithet}" CHECK ((NOT ("__accepted_{genus,specific_epithet}" IS DISTINCT FROM regexp_split_to_array("*Accepted_name", ' '::text)))),
|
|
20226 |
CONSTRAINT "__accepted_{genus,specific_epithet,infra_{rank,epithet}}" CHECK ((NOT ("__accepted_{genus,specific_epithet,infra_{rank,epithet}}" IS DISTINCT FROM regexp_split_to_array("*Accepted_name", ' '::text)))),
|
|
20227 | 20227 |
CONSTRAINT matched_has_accepted CHECK ((NOT (matched_has_accepted IS DISTINCT FROM ("*Accepted_name" IS NOT NULL)))), |
20228 | 20228 |
CONSTRAINT "matched~Name[_no_author]___@TNRS__@vegpath.org" CHECK ((NOT ("matched~Name[_no_author]___@TNRS__@vegpath.org" IS DISTINCT FROM NULLIF("*Name_matched", 'No suitable matches found.'::text)))) |
20229 | 20229 |
); |
... | ... | |
20416 | 20416 |
|
20417 | 20417 |
|
20418 | 20418 |
-- |
20419 |
-- Name: COLUMN taxon_match."__accepted_{genus,specific_epithet}"; Type: COMMENT; Schema: TNRS; Owner: - |
|
20419 |
-- Name: COLUMN taxon_match."__accepted_{genus,specific_epithet,infra_{rank,epithet}}"; Type: COMMENT; Schema: TNRS; Owner: -
|
|
20420 | 20420 |
-- |
20421 | 20421 |
|
20422 |
COMMENT ON COLUMN taxon_match."__accepted_{genus,specific_epithet}" IS ' |
|
20422 |
COMMENT ON COLUMN taxon_match."__accepted_{genus,specific_epithet,infra_{rank,epithet}}" IS '
|
|
20423 | 20423 |
= regexp_split_to_array("*Accepted_name", '' ''::text) |
20424 | 20424 |
|
20425 | 20425 |
derived column |
20426 | 20426 |
|
20427 | 20427 |
to modify expr: |
20428 |
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''__accepted_{genus,specific_epithet}'')::util.col, $$regexp_split_to_array("*Accepted_name", '' ''::text)$$)::util.derived_col_def); |
|
20428 |
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''__accepted_{genus,specific_epithet,infra_{rank,epithet}}'')::util.col, $$regexp_split_to_array("*Accepted_name", '' ''::text)$$)::util.derived_col_def);
|
|
20429 | 20429 |
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass); |
20430 | 20430 |
|
20431 | 20431 |
to rename: |
... | ... | |
20440 | 20440 |
-- |
20441 | 20441 |
|
20442 | 20442 |
COMMENT ON COLUMN taxon_match."[accepted_]genus__@DwC__@vegpath.org" IS ' |
20443 |
= COALESCE("__accepted_{genus,specific_epithet}"[1], |
|
20443 |
= COALESCE("__accepted_{genus,specific_epithet,infra_{rank,epithet}}"[1],
|
|
20444 | 20444 |
CASE |
20445 | 20445 |
WHEN ("*Accepted_name_rank" = ''genus''::text) THEN "*Accepted_name" |
20446 | 20446 |
ELSE NULL::text |
... | ... | |
20449 | 20449 |
derived column |
20450 | 20450 |
|
20451 | 20451 |
to modify expr: |
20452 |
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''[accepted_]genus__@DwC__@vegpath.org'')::util.col, $$COALESCE("__accepted_{genus,specific_epithet}"[1], |
|
20452 |
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''[accepted_]genus__@DwC__@vegpath.org'')::util.col, $$COALESCE("__accepted_{genus,specific_epithet,infra_{rank,epithet}}"[1],
|
|
20453 | 20453 |
CASE |
20454 | 20454 |
WHEN ("*Accepted_name_rank" = ''genus''::text) THEN "*Accepted_name" |
20455 | 20455 |
ELSE NULL::text |
... | ... | |
20468 | 20468 |
-- |
20469 | 20469 |
|
20470 | 20470 |
COMMENT ON COLUMN taxon_match."[accepted_]specificEpithet__@DwC__@vegpath.org" IS ' |
20471 |
= "__accepted_{genus,specific_epithet}"[2] |
|
20471 |
= "__accepted_{genus,specific_epithet,infra_{rank,epithet}}"[2]
|
|
20472 | 20472 |
|
20473 | 20473 |
derived column |
20474 | 20474 |
|
20475 | 20475 |
to modify expr: |
20476 |
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''[accepted_]specificEpithet__@DwC__@vegpath.org'')::util.col, $$"__accepted_{genus,specific_epithet}"[2]$$)::util.derived_col_def); |
|
20476 |
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''[accepted_]specificEpithet__@DwC__@vegpath.org'')::util.col, $$"__accepted_{genus,specific_epithet,infra_{rank,epithet}}"[2]$$)::util.derived_col_def);
|
|
20477 | 20477 |
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass); |
20478 | 20478 |
|
20479 | 20479 |
to rename: |
... | ... | |
20971 | 20971 |
taxon_match.matched_has_accepted, |
20972 | 20972 |
taxon_match."Accepted_family__@TNRS__@vegpath.org", |
20973 | 20973 |
taxon_match."Accepted_species[_binomial]__@TNRS__@vegpath.org", |
20974 |
taxon_match."__accepted_{genus,specific_epithet}", |
|
20974 |
taxon_match."__accepted_{genus,specific_epithet,infra_{rank,epithet}}" AS "__accepted_{genus,specific_epithet}",
|
|
20975 | 20975 |
taxon_match."[accepted_]genus__@DwC__@vegpath.org", |
20976 | 20976 |
taxon_match."[accepted_]specificEpithet__@DwC__@vegpath.org", |
20977 | 20977 |
taxon_match."[accepted_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org", |
Also available in: Unified diff
inputs/.TNRS/schema.sql: taxon_match."__accepted_{genus,specific_epithet}": renamed to "__accepted_{genus,specific_epithet,infra_{rank,epithet}}" since this now includes these other ranks as well