Project

General

Profile

« Previous | Next » 

Revision 13506

inputs/.TNRS/schema.sql: added MatchedTaxon_modify()

View differences:

vegbien.sql
16803 16803
SET search_path = "TNRS", pg_catalog;
16804 16804

  
16805 16805
--
16806
-- Name: MatchedTaxon_modify(text); Type: FUNCTION; Schema: TNRS; Owner: -
16807
--
16808

  
16809
CREATE FUNCTION "MatchedTaxon_modify"(view_query text) RETURNS void
16810
    LANGUAGE sql
16811
    AS $_$
16812
SELECT util.force_recreate($$
16813
-- trigger the dependent_objects_still_exist exception
16814
DROP VIEW "TNRS"."MatchedTaxon"; -- *not* CASCADE; it must trigger an exception
16815

  
16816
CREATE VIEW "TNRS"."MatchedTaxon" AS 
16817
$$||$1||$$
16818
;
16819
$$||util.mk_set_relation_metadata('"TNRS"."MatchedTaxon"')||$$
16820

  
16821
-- manually restore views that need to be updated for the changes
16822
-- **IMPORTANT**: keep these updated as described in the views' comments
16823

  
16824
CREATE VIEW "TNRS"."ValidMatchedTaxon" AS 
16825
 SELECT *
16826
   FROM "TNRS"."MatchedTaxon"
16827
  WHERE "MatchedTaxon".taxon_scrub__is_valid_match;
16828
$$||util.mk_set_relation_metadata('"TNRS"."ValidMatchedTaxon"')||$$
16829

  
16830
CREATE VIEW "TNRS".taxon_scrub AS 
16831
 SELECT *
16832
   FROM "TNRS"."ValidMatchedTaxon"
16833
   LEFT JOIN "TNRS"."taxon_scrub.scrubbed_unique_taxon_name.*" USING (scrubbed_unique_taxon_name);
16834
$$||util.mk_set_relation_metadata('"TNRS".taxon_scrub')||$$
16835
$$);
16836
$_$;
16837

  
16838

  
16839
--
16806 16840
-- Name: batch__fill(); Type: FUNCTION; Schema: TNRS; Owner: -
16807 16841
--
16808 16842

  

Also available in: Unified diff