Project

General

Profile

« Previous | Next » 

Revision 12389

schemas/vegbien.sql: added remake_diff_tables() with no args, which remakes all validatable datasources

View differences:

trunk/schemas/vegbien.my.sql
917 917

  
918 918

  
919 919
--
920
-- Name: remake_diff_tables(anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
921
--
922

  
923

  
924

  
925

  
926
--
920 927
-- Name: remake_diff_tables(varchar(255), anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
921 928
--
922 929

  
trunk/schemas/vegbien.sql
2058 2058

  
2059 2059

  
2060 2060
--
2061
-- Name: remake_diff_tables(anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
2062
--
2063

  
2064
CREATE FUNCTION remake_diff_tables(schema_anchor anyelement DEFAULT NULL::schema_anchor) RETURNS void
2065
    LANGUAGE plpgsql
2066
    SET search_path TO pg_temp
2067
    AS $$
2068
/* must use LANGUAGE plpgsql because LANGUAGE sql does not support runtime
2069
changes of search_path (schema elements are bound at inline time rather than
2070
runtime) */
2071
/* function option search_path is needed to limit the effects of
2072
`SET LOCAL search_path` (mk_set_search_path()) to the current function */
2073
BEGIN
2074
	EXECUTE util.mk_use_own_schema(schema_anchor);
2075
	
2076
	PERFORM remake_diff_tables(schema) FROM validatable_datasources() schema;
2077
END;
2078
$$;
2079

  
2080

  
2081
--
2061 2082
-- Name: remake_diff_tables(text, anyelement); Type: FUNCTION; Schema: public_validations; Owner: -
2062 2083
--
2063 2084

  

Also available in: Unified diff