Project

General

Profile

« Previous | Next » 

Revision 14416

bugfix: inputs/.TNRS/schema.sql: removed no longer used derived column __accepted_infraspecific_label, which had a buggy formula that broke derived_cols_populate()

View differences:

schema.sql
227 227
	new."[accepted_]genus__@DwC__@vegpath.org" = NULL;
228 228
	new."[accepted_]specificEpithet__@DwC__@vegpath.org" = NULL;
229 229
	new."[accepted_]morphospecies[_binomial]__@Brad__.TNRS@vegpath.org" = NULL;
230
	new.__accepted_infraspecific_label = NULL;
231 230
	new."__accepted_infraspecific_{rank,epithet}" = NULL;
232 231
	new."[accepted_]Infraspecific_rank[_abbr]__@TNRS__@vegpath.org" = NULL;
233 232
	new."[accepted_]infraspecificEpithet__@DwC__@vegpath.org" = NULL;
......
265 264
    WHEN ("*Accepted_name_rank" = 'genus'::text) THEN concat_ws(' '::text, "[accepted_]genus__@DwC__@vegpath.org", "[parsed_]morphospecies[_suffix]__@Brad__.morphosp@vegpath.org")
266 265
    ELSE "Accepted_species[_binomial]__@TNRS__@vegpath.org"
267 266
END FROM (SELECT new.*) new);
268
	new.__accepted_infraspecific_label = (SELECT ltrim(NULLIF("TNRS".remove_prefix("Accepted_species[_binomial]__@TNRS__@vegpath.org", "*Accepted_name", require := true, case_sensitive := false), ''::text), ' '::text) FROM (SELECT new.*) new);
269 267
	new."__accepted_infraspecific_{rank,epithet}" = (SELECT NULLIF("__accepted_{genus,specific_epithet,infra_{rank,epithet}}"[3:4], '{}'::text[]) FROM (SELECT new.*) new);
270 268
	new."[accepted_]Infraspecific_rank[_abbr]__@TNRS__@vegpath.org" = (SELECT "__accepted_infraspecific_{rank,epithet}"[1] FROM (SELECT new.*) new);
271 269
	new."[accepted_]infraspecificEpithet__@DwC__@vegpath.org" = (SELECT "__accepted_infraspecific_{rank,epithet}"[2] FROM (SELECT new.*) new);

Also available in: Unified diff