Revision 12326
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/util.sql | ||
---|---|---|
2709 | 2709 |
-- Name: show_views_like(text, text); Type: FUNCTION; Schema: util; Owner: - |
2710 | 2710 |
-- |
2711 | 2711 |
|
2712 |
CREATE FUNCTION show_views_like(schema text, name_regexp text) RETURNS SETOF regclass
|
|
2712 |
CREATE FUNCTION show_views_like(name_regexp text, schema text) RETURNS SETOF regclass
|
|
2713 | 2713 |
LANGUAGE sql STABLE |
2714 | 2714 |
AS $_$ |
2715 | 2715 |
SELECT oid FROM pg_class |
2716 |
WHERE relnamespace = util.schema_oid($1) AND relkind = 'v' AND relname ~ $2
|
|
2716 |
WHERE relnamespace = util.schema_oid($2) AND relkind = 'v' AND relname ~ $1
|
|
2717 | 2717 |
ORDER BY relname |
2718 | 2718 |
$_$; |
2719 | 2719 |
|
trunk/schemas/vegbien.sql | ||
---|---|---|
2155 | 2155 |
CREATE FUNCTION validation_views(schema text) RETURNS SETOF regclass |
2156 | 2156 |
LANGUAGE sql STABLE |
2157 | 2157 |
AS $_$ |
2158 |
SELECT * FROM util.show_views_like($1, '^_[[:alpha:]]+_\d+_')
|
|
2158 |
SELECT * FROM util.show_views_like('^_[[:alpha:]]+_\d+_', $1)
|
|
2159 | 2159 |
$_$; |
2160 | 2160 |
|
2161 | 2161 |
|
Also available in: Unified diff
schemas/util.sql: show_views_like(): reversed argument order to match show_relations_like()