Project

General

Profile

« Previous | Next » 

Revision 14269

inputs/.TNRS/schema.sql: taxon_match: added derived column _matched_has_accepted

View differences:

vegbien.sql
19301 19301
		"*Accepted_name" || COALESCE((' '::text || "*Accepted_name_author"), ''::text)
19302 19302
		FROM (SELECT new.*) new);
19303 19303
	
19304
	new._matched_has_accepted = (SELECT
19305
		"*Accepted_name" IS NOT NULL
19306
		FROM (SELECT new.*) new);
19307
	
19304 19308
	RETURN new;
19305 19309
END;
19306 19310
$$;
......
19482 19486
    "[accepted_]infraspecificEpithet__@DwC__@vegpath.org" text,
19483 19487
    "[matched_]scientificName[_with_author]__@DwC__@vegpath.org" text,
19484 19488
    "[accepted_]scientificName[_with_author]__@DwC__@vegpath.org" text,
19489
    _matched_has_accepted boolean,
19485 19490
    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]))),
19486 19491
    CONSTRAINT "[accepted_]genus__@DwC__@vegpath.org" CHECK ((NOT ("[accepted_]genus__@DwC__@vegpath.org" IS DISTINCT FROM "__accepted_{genus,specific_epithet}"[1]))),
19487 19492
    CONSTRAINT "[accepted_]infraspecificEpithet__@DwC__@vegpath.org" CHECK ((NOT ("[accepted_]infraspecificEpithet__@DwC__@vegpath.org" IS DISTINCT FROM "__accepted_infraspecific_{rank,epithet}"[2]))),
......
19490 19495
    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))))),
19491 19496
    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)))),
19492 19497
    CONSTRAINT "__accepted_infraspecific_{rank,epithet}" CHECK ((NOT ("__accepted_infraspecific_{rank,epithet}" IS DISTINCT FROM regexp_split_to_array(__accepted_infraspecific_label, ' '::text)))),
19493
    CONSTRAINT "__accepted_{genus,specific_epithet}" CHECK ((NOT ("__accepted_{genus,specific_epithet}" IS DISTINCT FROM regexp_split_to_array("*Accepted_name_species", ' '::text))))
19498
    CONSTRAINT "__accepted_{genus,specific_epithet}" CHECK ((NOT ("__accepted_{genus,specific_epithet}" IS DISTINCT FROM regexp_split_to_array("*Accepted_name_species", ' '::text)))),
19499
    CONSTRAINT _matched_has_accepted CHECK ((NOT (_matched_has_accepted IS DISTINCT FROM ("*Accepted_name" IS NOT NULL))))
19494 19500
);
19495 19501

  
19496 19502

  
......
19641 19647

  
19642 19648

  
19643 19649
--
19650
-- Name: COLUMN taxon_match._matched_has_accepted; Type: COMMENT; Schema: TNRS; Owner: -
19651
--
19652

  
19653
COMMENT ON COLUMN taxon_match._matched_has_accepted IS '
19654
derived column; = "*Accepted_name" IS NOT NULL
19655

  
19656
to modify:
19657
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''_matched_has_accepted'')::util.col, $$"*Accepted_name" IS NOT NULL$$)::util.derived_col_def);
19658
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass);
19659
';
19660

  
19661

  
19662
--
19644 19663
-- Name: taxon_best_match; Type: VIEW; Schema: TNRS; Owner: -
19645 19664
--
19646 19665

  

Also available in: Unified diff