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:

schema.sql
461 461
--
462 462

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

  
466 466
to modify:
467
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);
467
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);
468 468
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass);
469 469
';
470 470

  
......
474 474
--
475 475

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

  
479 479
to modify:
480
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);
480
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);
481 481
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass);
482 482
';
483 483

  
......
513 513
--
514 514

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

  
518 518
to modify:
519
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);
519
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);
520 520
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass);
521 521
';
522 522

  
......
526 526
--
527 527

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

  
531 531
to modify:
532
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);
532
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);
533 533
SELECT util.derived_cols_populate(''"TNRS".taxon_match''::regclass);
534 534
';
535 535

  

Also available in: Unified diff