Revision 14278
Added by Aaron Marcuse-Kubitza over 10 years ago
vegbien.sql | ||
---|---|---|
19305 | 19305 |
"*Accepted_name" IS NOT NULL |
19306 | 19306 |
FROM (SELECT new.*) new); |
19307 | 19307 |
|
19308 |
new."[matched_]species[_binomial]~(-Accepted_-)__@TNRS__@vegpath.org" = (SELECT |
|
19309 |
("*Genus_matched" || ' '::text) || "*Specific_epithet_matched" |
|
19310 |
FROM (SELECT new.*) new); |
|
19311 |
|
|
19308 | 19312 |
RETURN new; |
19309 | 19313 |
END; |
19310 | 19314 |
$$; |
... | ... | |
19487 | 19491 |
"[matched_]scientificName[_with_author]__@DwC__@vegpath.org" text, |
19488 | 19492 |
"[accepted_]scientificName[_with_author]__@DwC__@vegpath.org" text, |
19489 | 19493 |
matched_has_accepted boolean, |
19494 |
"[matched_]species[_binomial]~(-Accepted_-)__@TNRS__@vegpath.org" text, |
|
19490 | 19495 |
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]))), |
19491 | 19496 |
CONSTRAINT "[accepted_]genus__@DwC__@vegpath.org" CHECK ((NOT ("[accepted_]genus__@DwC__@vegpath.org" IS DISTINCT FROM "__accepted_{genus,specific_epithet}"[1]))), |
19492 | 19497 |
CONSTRAINT "[accepted_]infraspecificEpithet__@DwC__@vegpath.org" CHECK ((NOT ("[accepted_]infraspecificEpithet__@DwC__@vegpath.org" IS DISTINCT FROM "__accepted_infraspecific_{rank,epithet}"[2]))), |
19493 | 19498 |
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))))), |
19494 | 19499 |
CONSTRAINT "[accepted_]specificEpithet__@DwC__@vegpath.org" CHECK ((NOT ("[accepted_]specificEpithet__@DwC__@vegpath.org" IS DISTINCT FROM "__accepted_{genus,specific_epithet}"[2]))), |
19495 | 19500 |
CONSTRAINT "[matched_]scientificName[_with_author]__@DwC__@vegpath.org" CHECK ((NOT ("[matched_]scientificName[_with_author]__@DwC__@vegpath.org" IS DISTINCT FROM ("*Name_matched" || COALESCE((' '::text || "*Name_matched_author"), ''::text))))), |
19501 |
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")))), |
|
19496 | 19502 |
CONSTRAINT __accepted_infraspecific_label CHECK ((NOT (__accepted_infraspecific_label IS DISTINCT FROM ltrim(NULLIF(util.remove_prefix("*Accepted_name_species", "*Accepted_name", require := true), ''::text), ' '::text)))), |
19497 | 19503 |
CONSTRAINT "__accepted_infraspecific_{rank,epithet}" CHECK ((NOT ("__accepted_infraspecific_{rank,epithet}" IS DISTINCT FROM regexp_split_to_array(__accepted_infraspecific_label, ' '::text)))), |
19498 | 19504 |
CONSTRAINT "__accepted_{genus,specific_epithet}" CHECK ((NOT ("__accepted_{genus,specific_epithet}" IS DISTINCT FROM regexp_split_to_array("*Accepted_name_species", ' '::text)))), |
... | ... | |
19710 | 19716 |
|
19711 | 19717 |
|
19712 | 19718 |
-- |
19719 |
-- Name: COLUMN taxon_match."[matched_]species[_binomial]~(-Accepted_-)__@TNRS__@vegpath.org"; Type: COMMENT; Schema: TNRS; Owner: - |
|
19720 |
-- |
|
19721 |
|
|
19722 |
COMMENT ON COLUMN taxon_match."[matched_]species[_binomial]~(-Accepted_-)__@TNRS__@vegpath.org" IS ' |
|
19723 |
derived column; = ("*Genus_matched" || '' ''::text) || "*Specific_epithet_matched" |
|
19724 |
|
|
19725 |
to modify expr: |
|
19726 |
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''[matched_]species[_binomial]~(-Accepted_-)__@TNRS__@vegpath.org'')::util.col, $$"*Genus_matched" || '' ''::text || "*Specific_epithet_matched"$$)::util.derived_col_def); |
|
19727 |
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass); |
|
19728 |
|
|
19729 |
to rename: |
|
19730 |
# rename column |
|
19731 |
# rename CHECK constraint |
|
19732 |
SELECT util.derived_cols_update(''"TNRS".taxon_match''::regclass); |
|
19733 |
'; |
|
19734 |
|
|
19735 |
|
|
19736 |
-- |
|
19713 | 19737 |
-- Name: taxon_best_match; Type: VIEW; Schema: TNRS; Owner: - |
19714 | 19738 |
-- |
19715 | 19739 |
|
Also available in: Unified diff
inputs/.TNRS/schema.sql: taxon_match: added derived column "[matched_]species[_binomial]~(
Accepted_)__@TNRS__@vegpath.org"