Revision 12415
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/vegbien.my.sql | ||
---|---|---|
994 | 994 |
|
995 | 995 |
|
996 | 996 |
-- |
997 |
-- Name: rm_query_group(varchar(255), anyelement); Type: FUNCTION; Schema: public_validations; Owner: - |
|
998 |
-- |
|
999 |
|
|
1000 |
|
|
1001 |
|
|
1002 |
|
|
1003 |
-- |
|
1004 |
-- Name: FUNCTION rm_query_group(group_ varchar(255), schema_anchor anyelement); Type: COMMENT; Schema: public_validations; Owner: - |
|
1005 |
-- |
|
1006 |
|
|
1007 |
|
|
1008 |
|
|
1009 |
|
|
1010 |
-- |
|
997 | 1011 |
-- Name: rm_query_view(regclass, anyelement); Type: FUNCTION; Schema: public_validations; Owner: - |
998 | 1012 |
-- |
999 | 1013 |
|
trunk/schemas/vegbien.sql | ||
---|---|---|
2275 | 2275 |
|
2276 | 2276 |
|
2277 | 2277 |
-- |
2278 |
-- Name: rm_query_group(text, anyelement); Type: FUNCTION; Schema: public_validations; Owner: - |
|
2279 |
-- |
|
2280 |
|
|
2281 |
CREATE FUNCTION rm_query_group(group_ text, schema_anchor anyelement DEFAULT NULL::schema_anchor) RETURNS void |
|
2282 |
LANGUAGE sql |
|
2283 |
AS $_$ |
|
2284 |
SELECT util.drop_relations_like('^_'||util.regexp_quote($1)||'_', $2, |
|
2285 |
force := true/*needed because some query-view-relations depend on others*/) |
|
2286 |
$_$; |
|
2287 |
|
|
2288 |
|
|
2289 |
-- |
|
2290 |
-- Name: FUNCTION rm_query_group(group_ text, schema_anchor anyelement); Type: COMMENT; Schema: public_validations; Owner: - |
|
2291 |
-- |
|
2292 |
|
|
2293 |
COMMENT ON FUNCTION rm_query_group(group_ text, schema_anchor anyelement) IS ' |
|
2294 |
removes all validations queries with a particular group prefix. |
|
2295 |
note that this will cascadingly drop all input/ouptut tables for those queries'' |
|
2296 |
results, as well (as these inherit from type tables in this schema). |
|
2297 |
|
|
2298 |
usage: |
|
2299 |
SELECT public_validations.rm_query_group(''plots''); |
|
2300 |
|
|
2301 |
idempotent |
|
2302 |
|
|
2303 |
schema_anchor: identifies which schema to use. should be left as the default value. |
|
2304 |
'; |
|
2305 |
|
|
2306 |
|
|
2307 |
-- |
|
2278 | 2308 |
-- Name: rm_query_view(regclass, anyelement); Type: FUNCTION; Schema: public_validations; Owner: - |
2279 | 2309 |
-- |
2280 | 2310 |
|
Also available in: Unified diff
schemas/vegbien.sql: added rm_query_group(), which removes all validations queries with a particular group prefix