Revision 14305
Added by Aaron Marcuse-Kubitza over 10 years ago
vegbien.sql | ||
---|---|---|
19377 | 19377 |
|
19378 | 19378 |
new."[accepted_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org" = (SELECT |
19379 | 19379 |
CASE |
19380 |
WHEN ("*Accepted_name_rank" = 'family'::text) THEN concat_ws(' '::text, "*Accepted_name_family", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org")
|
|
19381 |
WHEN ("*Accepted_name_rank" = 'genus'::text) THEN concat_ws(' '::text, "*Accepted_name", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org")
|
|
19382 |
ELSE "*Accepted_name_species"
|
|
19383 |
END
|
|
19380 |
WHEN ("*Accepted_name_rank" = 'family'::text) THEN concat_ws(' '::text, "*Accepted_name_family", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org") |
|
19381 |
WHEN ("*Accepted_name_rank" = 'genus'::text) THEN concat_ws(' '::text, "*Accepted_name", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org") |
|
19382 |
ELSE "*Accepted_name_species" |
|
19383 |
END |
|
19384 | 19384 |
FROM (SELECT new.*) new); |
19385 | 19385 |
|
19386 | 19386 |
RETURN new; |
... | ... | |
20183 | 20183 |
-- |
20184 | 20184 |
|
20185 | 20185 |
COMMENT ON COLUMN taxon_match."[accepted_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org" IS ' |
20186 |
= |
|
20187 |
CASE |
|
20188 |
WHEN "*Accepted_name_rank" = ''family''::text THEN concat_ws('' ''::text, "*Accepted_name_family", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org") |
|
20189 |
WHEN "*Accepted_name_rank" = ''genus''::text THEN concat_ws('' ''::text, "*Accepted_name", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org") |
|
20190 |
ELSE "*Accepted_name_species" |
|
20191 |
END |
|
20186 |
= CASE |
|
20187 |
WHEN ("*Accepted_name_rank" = ''family''::text) THEN concat_ws('' ''::text, "*Accepted_name_family", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org") |
|
20188 |
WHEN ("*Accepted_name_rank" = ''genus''::text) THEN concat_ws('' ''::text, "*Accepted_name", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org") |
|
20189 |
ELSE "*Accepted_name_species" |
|
20190 |
END |
|
20192 | 20191 |
|
20193 | 20192 |
derived column |
20194 | 20193 |
|
20195 | 20194 |
to modify expr: |
20196 | 20195 |
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''[accepted_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org'')::util.col, $$CASE |
20197 |
WHEN ("*Accepted_name_rank" = ''family''::text) THEN concat_ws('' ''::text, "*Accepted_name_family", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org")
|
|
20198 |
WHEN ("*Accepted_name_rank" = ''genus''::text) THEN concat_ws('' ''::text, "*Accepted_name", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org")
|
|
20199 |
ELSE "*Accepted_name_species"
|
|
20200 |
END$$)::util.derived_col_def);
|
|
20196 |
WHEN ("*Accepted_name_rank" = ''family''::text) THEN concat_ws('' ''::text, "*Accepted_name_family", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org") |
|
20197 |
WHEN ("*Accepted_name_rank" = ''genus''::text) THEN concat_ws('' ''::text, "*Accepted_name", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org") |
|
20198 |
ELSE "*Accepted_name_species" |
|
20199 |
END$$)::util.derived_col_def); |
|
20201 | 20200 |
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass); |
20202 | 20201 |
|
20203 | 20202 |
to rename: |
Also available in: Unified diff
bugfix: schemas/util.sql: derived_col_update(): set_comment(): vars can't have same name as params, which will be substituted