Revision 12386
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/vegbien.sql | ||
---|---|---|
2297 | 2297 |
-- Name: validation_views(text); Type: FUNCTION; Schema: public_validations; Owner: - |
2298 | 2298 |
-- |
2299 | 2299 |
|
2300 |
CREATE FUNCTION validation_views(schema text) RETURNS SETOF regclass |
|
2300 |
CREATE FUNCTION validation_views(schema text DEFAULT NULL::text) RETURNS SETOF regclass
|
|
2301 | 2301 |
LANGUAGE sql STABLE |
2302 | 2302 |
AS $_$ |
2303 |
SELECT * |
|
2304 |
FROM util.show_views_like('^_[[:alpha:]]+_\d+_', util.str_equality_regexp($1)) |
|
2303 |
SELECT * FROM util.show_views_like('^_[[:alpha:]]+_\d+_', |
|
2304 |
(CASE WHEN $1 IS NULL THEN '^(?!.*_validations$)'/*all datasources*/ |
|
2305 |
ELSE util.str_equality_regexp($1) END)) |
|
2305 | 2306 |
$_$; |
2306 | 2307 |
|
2307 | 2308 |
|
Also available in: Unified diff
schemas/vegbien.sql: validation_views(): allow leaving out schema to match all datasources