Revision 12387
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/vegbien.my.sql | ||
---|---|---|
1001 | 1001 |
|
1002 | 1002 |
|
1003 | 1003 |
-- |
1004 |
-- Name: validatable_datasources(anyelement); Type: FUNCTION; Schema: public_validations; Owner: - |
|
1005 |
-- |
|
1006 |
|
|
1007 |
|
|
1008 |
|
|
1009 |
|
|
1010 |
-- |
|
1004 | 1011 |
-- Name: validation_views(varchar(255)); Type: FUNCTION; Schema: public_validations; Owner: - |
1005 | 1012 |
-- |
1006 | 1013 |
|
trunk/schemas/vegbien.sql | ||
---|---|---|
2294 | 2294 |
|
2295 | 2295 |
|
2296 | 2296 |
-- |
2297 |
-- Name: validatable_datasources(anyelement); Type: FUNCTION; Schema: public_validations; Owner: - |
|
2298 |
-- |
|
2299 |
|
|
2300 |
CREATE FUNCTION validatable_datasources(schema_anchor anyelement DEFAULT NULL::schema_anchor) RETURNS SETOF text |
|
2301 |
LANGUAGE plpgsql |
|
2302 |
AS $$ |
|
2303 |
/* must use LANGUAGE plpgsql because LANGUAGE sql does not support runtime |
|
2304 |
changes of search_path (schema elements are bound at inline time rather than |
|
2305 |
runtime) */ |
|
2306 |
/* function option search_path is needed to limit the effects of |
|
2307 |
`SET LOCAL search_path` (mk_set_search_path()) to the current function */ |
|
2308 |
BEGIN |
|
2309 |
EXECUTE util.mk_use_own_schema(schema_anchor); |
|
2310 |
|
|
2311 |
RETURN QUERY |
|
2312 |
SELECT DISTINCT util.schema(view) FROM validation_views() view; |
|
2313 |
END; |
|
2314 |
$$; |
|
2315 |
|
|
2316 |
|
|
2317 |
-- |
|
2297 | 2318 |
-- Name: validation_views(text); Type: FUNCTION; Schema: public_validations; Owner: - |
2298 | 2319 |
-- |
2299 | 2320 |
|
Also available in: Unified diff
schemas/vegbien.sql: added validatable_datasources()