Revision 13378
Added by Aaron Marcuse-Kubitza over 10 years ago
trunk/schemas/vegbien.my.sql | ||
---|---|---|
2749 | 2749 |
|
2750 | 2750 |
|
2751 | 2751 |
-- |
2752 |
-- Name: rm_output_queries(varchar(255), int(11), anyelement); Type: FUNCTION; Schema: public_validations; Owner: - |
|
2752 |
-- Name: rm_output_queries(varchar(255), int(11), anyelement, varchar(255)); Type: FUNCTION; Schema: public_validations; Owner: -
|
|
2753 | 2753 |
-- |
2754 | 2754 |
|
2755 | 2755 |
|
2756 | 2756 |
|
2757 | 2757 |
|
2758 | 2758 |
-- |
2759 |
-- Name: FUNCTION rm_output_queries(name varchar(255), max_prefix_len int(11), schema_anchor anyelement); Type: COMMENT; Schema: public_validations; Owner: - |
|
2759 |
-- Name: FUNCTION rm_output_queries(name varchar(255), max_prefix_len int(11), schema_anchor anyelement, query_view_regexp varchar(255)); Type: COMMENT; Schema: public_validations; Owner: -
|
|
2760 | 2760 |
-- |
2761 | 2761 |
|
2762 | 2762 |
|
... | ... | |
2784 | 2784 |
|
2785 | 2785 |
|
2786 | 2786 |
-- |
2787 |
-- Name: validation_views(varchar(255)); Type: FUNCTION; Schema: public_validations; Owner: - |
|
2787 |
-- Name: validation_views(varchar(255), varchar(255)); Type: FUNCTION; Schema: public_validations; Owner: -
|
|
2788 | 2788 |
-- |
2789 | 2789 |
|
2790 | 2790 |
|
trunk/schemas/public_.sql | ||
---|---|---|
4633 | 4633 |
|
4634 | 4634 |
|
4635 | 4635 |
-- |
4636 |
-- Name: rm_output_queries(text, integer, anyelement); Type: FUNCTION; Schema: public_validations; Owner: - |
|
4636 |
-- Name: rm_output_queries(text, integer, anyelement, text); Type: FUNCTION; Schema: public_validations; Owner: -
|
|
4637 | 4637 |
-- |
4638 | 4638 |
|
4639 |
CREATE FUNCTION rm_output_queries(name text DEFAULT NULL::text, max_prefix_len integer DEFAULT query_view_relation_max_prefix_len(), schema_anchor anyelement DEFAULT NULL::schema_anchor) RETURNS void |
|
4639 |
CREATE FUNCTION rm_output_queries(name text DEFAULT NULL::text, max_prefix_len integer DEFAULT query_view_relation_max_prefix_len(), schema_anchor anyelement DEFAULT NULL::schema_anchor, query_view_regexp text DEFAULT query_view_regexp()) RETURNS void
|
|
4640 | 4640 |
LANGUAGE sql |
4641 | 4641 |
AS $_$ |
4642 | 4642 |
SELECT util.drop_relations_like( |
4643 |
COALESCE(util.truncated_prefixed_name_regexp($1, $2), '^_[[:alpha:]]+_\d+'),
|
|
4643 |
COALESCE(util.truncated_prefixed_name_regexp($1, $2), $4),
|
|
4644 | 4644 |
$3, force := true/*needed because some query-view-relations depend on others*/) |
4645 | 4645 |
$_$; |
4646 | 4646 |
|
4647 | 4647 |
|
4648 | 4648 |
-- |
4649 |
-- Name: FUNCTION rm_output_queries(name text, max_prefix_len integer, schema_anchor anyelement); Type: COMMENT; Schema: public_validations; Owner: - |
|
4649 |
-- Name: FUNCTION rm_output_queries(name text, max_prefix_len integer, schema_anchor anyelement, query_view_regexp text); Type: COMMENT; Schema: public_validations; Owner: -
|
|
4650 | 4650 |
-- |
4651 | 4651 |
|
4652 |
COMMENT ON FUNCTION rm_output_queries(name text, max_prefix_len integer, schema_anchor anyelement) IS ' |
|
4652 |
COMMENT ON FUNCTION rm_output_queries(name text, max_prefix_len integer, schema_anchor anyelement, query_view_regexp text) IS '
|
|
4653 | 4653 |
removes validations *output* queries (in this function''s schema) |
4654 | 4654 |
|
4655 | 4655 |
note that this will cascadingly drop all result tables for those queries as well |
... | ... | |
4735 | 4735 |
|
4736 | 4736 |
|
4737 | 4737 |
-- |
4738 |
-- Name: validation_views(text); Type: FUNCTION; Schema: public_validations; Owner: - |
|
4738 |
-- Name: validation_views(text, text); Type: FUNCTION; Schema: public_validations; Owner: -
|
|
4739 | 4739 |
-- |
4740 | 4740 |
|
4741 |
CREATE FUNCTION validation_views(schema text DEFAULT NULL::text) RETURNS SETOF regclass |
|
4741 |
CREATE FUNCTION validation_views(schema text DEFAULT NULL::text, query_view_regexp text DEFAULT query_view_regexp()) RETURNS SETOF regclass
|
|
4742 | 4742 |
LANGUAGE sql STABLE |
4743 | 4743 |
AS $_$ |
4744 |
SELECT * FROM util.show_views_like('^_[[:alpha:]]+_\d+', (CASE WHEN $1 IS NULL
|
|
4744 |
SELECT * FROM util.show_views_like($2, (CASE WHEN $1 IS NULL
|
|
4745 | 4745 |
THEN ''/*all schemas*/ ELSE util.str_equality_regexp($1) END)) |
4746 | 4746 |
$_$; |
4747 | 4747 |
|
trunk/schemas/vegbien.sql | ||
---|---|---|
4633 | 4633 |
|
4634 | 4634 |
|
4635 | 4635 |
-- |
4636 |
-- Name: rm_output_queries(text, integer, anyelement); Type: FUNCTION; Schema: public_validations; Owner: - |
|
4636 |
-- Name: rm_output_queries(text, integer, anyelement, text); Type: FUNCTION; Schema: public_validations; Owner: -
|
|
4637 | 4637 |
-- |
4638 | 4638 |
|
4639 |
CREATE FUNCTION rm_output_queries(name text DEFAULT NULL::text, max_prefix_len integer DEFAULT query_view_relation_max_prefix_len(), schema_anchor anyelement DEFAULT NULL::schema_anchor) RETURNS void |
|
4639 |
CREATE FUNCTION rm_output_queries(name text DEFAULT NULL::text, max_prefix_len integer DEFAULT query_view_relation_max_prefix_len(), schema_anchor anyelement DEFAULT NULL::schema_anchor, query_view_regexp text DEFAULT query_view_regexp()) RETURNS void
|
|
4640 | 4640 |
LANGUAGE sql |
4641 | 4641 |
AS $_$ |
4642 | 4642 |
SELECT util.drop_relations_like( |
4643 |
COALESCE(util.truncated_prefixed_name_regexp($1, $2), '^_[[:alpha:]]+_\d+'),
|
|
4643 |
COALESCE(util.truncated_prefixed_name_regexp($1, $2), $4),
|
|
4644 | 4644 |
$3, force := true/*needed because some query-view-relations depend on others*/) |
4645 | 4645 |
$_$; |
4646 | 4646 |
|
4647 | 4647 |
|
4648 | 4648 |
-- |
4649 |
-- Name: FUNCTION rm_output_queries(name text, max_prefix_len integer, schema_anchor anyelement); Type: COMMENT; Schema: public_validations; Owner: - |
|
4649 |
-- Name: FUNCTION rm_output_queries(name text, max_prefix_len integer, schema_anchor anyelement, query_view_regexp text); Type: COMMENT; Schema: public_validations; Owner: -
|
|
4650 | 4650 |
-- |
4651 | 4651 |
|
4652 |
COMMENT ON FUNCTION rm_output_queries(name text, max_prefix_len integer, schema_anchor anyelement) IS ' |
|
4652 |
COMMENT ON FUNCTION rm_output_queries(name text, max_prefix_len integer, schema_anchor anyelement, query_view_regexp text) IS '
|
|
4653 | 4653 |
removes validations *output* queries (in this function''s schema) |
4654 | 4654 |
|
4655 | 4655 |
note that this will cascadingly drop all result tables for those queries as well |
... | ... | |
4735 | 4735 |
|
4736 | 4736 |
|
4737 | 4737 |
-- |
4738 |
-- Name: validation_views(text); Type: FUNCTION; Schema: public_validations; Owner: - |
|
4738 |
-- Name: validation_views(text, text); Type: FUNCTION; Schema: public_validations; Owner: -
|
|
4739 | 4739 |
-- |
4740 | 4740 |
|
4741 |
CREATE FUNCTION validation_views(schema text DEFAULT NULL::text) RETURNS SETOF regclass |
|
4741 |
CREATE FUNCTION validation_views(schema text DEFAULT NULL::text, query_view_regexp text DEFAULT query_view_regexp()) RETURNS SETOF regclass
|
|
4742 | 4742 |
LANGUAGE sql STABLE |
4743 | 4743 |
AS $_$ |
4744 |
SELECT * FROM util.show_views_like('^_[[:alpha:]]+_\d+', (CASE WHEN $1 IS NULL
|
|
4744 |
SELECT * FROM util.show_views_like($2, (CASE WHEN $1 IS NULL
|
|
4745 | 4745 |
THEN ''/*all schemas*/ ELSE util.str_equality_regexp($1) END)) |
4746 | 4746 |
$_$; |
4747 | 4747 |
|
Also available in: Unified diff
schemas/public_.sql: rm_output_queries(), validation_views(): use public_validations.query_view_regexp()