Project

General

Profile

« Previous | Next » 

Revision 14273

bugfix: schemas/util.sql: derived_col_update(): don't set_comment() until CHECK constraint exists so that we can use its canon-ed formula

View differences:

vegbien.sql
19573 19573
--
19574 19574

  
19575 19575
COMMENT ON COLUMN taxon_match.__accepted_infraspecific_label IS '
19576
derived column; = ltrim(NULLIF(util.remove_prefix("*Accepted_name_species", "*Accepted_name", require := true), ''''), '' '')
19576
derived column; = ltrim(NULLIF(util.remove_prefix("*Accepted_name_species", "*Accepted_name", require := true), ''''::text), '' ''::text)
19577 19577

  
19578 19578
to modify:
19579
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''__accepted_infraspecific_label'')::util.col, $$ltrim(NULLIF(util.remove_prefix("*Accepted_name_species", "*Accepted_name", require := true), ''''), '' '')$$)::util.derived_col_def);
19579
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''__accepted_infraspecific_label'')::util.col, $$ltrim(NULLIF(util.remove_prefix("*Accepted_name_species", "*Accepted_name", require := true), ''''::text), '' ''::text)$$)::util.derived_col_def);
19580 19580
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass);
19581 19581
';
19582 19582

  
......
19586 19586
--
19587 19587

  
19588 19588
COMMENT ON COLUMN taxon_match."__accepted_infraspecific_{rank,epithet}" IS '
19589
derived column; = regexp_split_to_array("__accepted_infraspecific_label", '' ''::text)
19589
derived column; = regexp_split_to_array(__accepted_infraspecific_label, '' ''::text)
19590 19590

  
19591 19591
to modify:
19592
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''__accepted_infraspecific_{rank,epithet}'')::util.col, $$regexp_split_to_array("__accepted_infraspecific_label", '' ''::text)$$)::util.derived_col_def);
19592
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''__accepted_infraspecific_{rank,epithet}'')::util.col, $$regexp_split_to_array(__accepted_infraspecific_label, '' ''::text)$$)::util.derived_col_def);
19593 19593
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass);
19594 19594
';
19595 19595

  
......
19625 19625
--
19626 19626

  
19627 19627
COMMENT ON COLUMN taxon_match."[matched_]scientificName[_with_author]__@DwC__@vegpath.org" IS '
19628
derived column; = "*Name_matched" || COALESCE('' ''::text || "*Name_matched_author", ''''::text)
19628
derived column; = "*Name_matched" || COALESCE(('' ''::text || "*Name_matched_author"), ''''::text)
19629 19629

  
19630 19630
to modify:
19631
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''[matched_]scientificName[_with_author]__@DwC__@vegpath.org'')::util.col, $$"*Name_matched" || COALESCE('' ''::text || "*Name_matched_author", ''''::text)$$)::util.derived_col_def);
19631
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''[matched_]scientificName[_with_author]__@DwC__@vegpath.org'')::util.col, $$"*Name_matched" || COALESCE(('' ''::text || "*Name_matched_author"), ''''::text)$$)::util.derived_col_def);
19632 19632
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass);
19633 19633
';
19634 19634

  
......
19638 19638
--
19639 19639

  
19640 19640
COMMENT ON COLUMN taxon_match."[accepted_]scientificName[_with_author]__@DwC__@vegpath.org" IS '
19641
derived column; = "*Accepted_name" || COALESCE('' ''::text || "*Accepted_name_author", ''''::text)
19641
derived column; = "*Accepted_name" || COALESCE(('' ''::text || "*Accepted_name_author"), ''''::text)
19642 19642

  
19643 19643
to modify:
19644
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''[accepted_]scientificName[_with_author]__@DwC__@vegpath.org'')::util.col, $$"*Accepted_name" || COALESCE('' ''::text || "*Accepted_name_author", ''''::text)$$)::util.derived_col_def);
19644
SELECT util.derived_col_update(((''"TNRS".taxon_match'', ''[accepted_]scientificName[_with_author]__@DwC__@vegpath.org'')::util.col, $$"*Accepted_name" || COALESCE(('' ''::text || "*Accepted_name_author"), ''''::text)$$)::util.derived_col_def);
19645 19645
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass);
19646 19646
';
19647 19647

  

Also available in: Unified diff