Project

General

Profile

« Previous | Next » 

Revision 12385

schemas/util.sql: show_views_like(): take a schema regexp like util.show_relations_like(), to allow matching views in all schemas

View differences:

util.sql
2983 2983
-- Name: show_views_like(text, text); Type: FUNCTION; Schema: util; Owner: -
2984 2984
--
2985 2985

  
2986
CREATE FUNCTION show_views_like(name_regexp text, schema text) RETURNS SETOF regclass
2986
CREATE FUNCTION show_views_like(name_regexp text, schema_regexp text DEFAULT ''::text) RETURNS SETOF regclass
2987 2987
    LANGUAGE sql STABLE
2988 2988
    AS $_$
2989
SELECT view_
2990
FROM util.show_relations_like($1, types := ARRAY['v']) view_
2991
WHERE util.schema(view_) = $2
2989
SELECT * FROM util.show_relations_like($1, $2, ARRAY['v'])
2992 2990
$_$;
2993 2991

  
2994 2992

  

Also available in: Unified diff