Project

General

Profile

« Previous | Next » 

Revision 13382

schemas/public_.sql: validation_views(): added prefix param, which can be used for additional subsetting

View differences:

trunk/schemas/vegbien.my.sql
2791 2791

  
2792 2792

  
2793 2793
--
2794
-- Name: validation_views(varchar(255), varchar(255)); Type: FUNCTION; Schema: public_validations; Owner: -
2794
-- Name: validation_views(varchar(255), varchar(255), varchar(255)); Type: FUNCTION; Schema: public_validations; Owner: -
2795 2795
--
2796 2796

  
2797 2797

  
trunk/schemas/public_.sql
4753 4753

  
4754 4754

  
4755 4755
--
4756
-- Name: validation_views(text, text); Type: FUNCTION; Schema: public_validations; Owner: -
4756
-- Name: validation_views(text, text, text); Type: FUNCTION; Schema: public_validations; Owner: -
4757 4757
--
4758 4758

  
4759
CREATE FUNCTION validation_views(schema text DEFAULT NULL::text, query_view_regexp text DEFAULT query_view_regexp()) RETURNS SETOF regclass
4759
CREATE FUNCTION validation_views(schema text DEFAULT NULL::text, prefix text DEFAULT NULL::text, query_view_regexp text DEFAULT query_view_regexp()) RETURNS SETOF regclass
4760 4760
    LANGUAGE sql STABLE
4761 4761
    AS $_$
4762
SELECT * FROM util.show_views_like($2, (CASE WHEN $1 IS NULL
4762
SELECT * FROM util.show_views_like(COALESCE('^'||$2, $3), (CASE WHEN $1 IS NULL
4763 4763
THEN ''/*all schemas*/ ELSE util.str_equality_regexp($1) END))
4764 4764
$_$;
4765 4765

  
trunk/schemas/vegbien.sql
4753 4753

  
4754 4754

  
4755 4755
--
4756
-- Name: validation_views(text, text); Type: FUNCTION; Schema: public_validations; Owner: -
4756
-- Name: validation_views(text, text, text); Type: FUNCTION; Schema: public_validations; Owner: -
4757 4757
--
4758 4758

  
4759
CREATE FUNCTION validation_views(schema text DEFAULT NULL::text, query_view_regexp text DEFAULT query_view_regexp()) RETURNS SETOF regclass
4759
CREATE FUNCTION validation_views(schema text DEFAULT NULL::text, prefix text DEFAULT NULL::text, query_view_regexp text DEFAULT query_view_regexp()) RETURNS SETOF regclass
4760 4760
    LANGUAGE sql STABLE
4761 4761
    AS $_$
4762
SELECT * FROM util.show_views_like($2, (CASE WHEN $1 IS NULL
4762
SELECT * FROM util.show_views_like(COALESCE('^'||$2, $3), (CASE WHEN $1 IS NULL
4763 4763
THEN ''/*all schemas*/ ELSE util.str_equality_regexp($1) END))
4764 4764
$_$;
4765 4765

  

Also available in: Unified diff