Revision 12324
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/schemas/util.sql | ||
---|---|---|
2466 | 2466 |
|
2467 | 2467 |
|
2468 | 2468 |
-- |
2469 |
-- Name: schema_matches(text, text); Type: FUNCTION; Schema: util; Owner: - |
|
2470 |
-- |
|
2471 |
|
|
2472 |
CREATE FUNCTION schema_matches(schema text, schema_regexp text) RETURNS boolean |
|
2473 |
LANGUAGE sql STABLE |
|
2474 |
AS $_$ |
|
2475 |
SELECT $1 ~ $2 AND /*in userspace*/$1 !~ '^(?:information_schema|pg_.*)$' |
|
2476 |
$_$; |
|
2477 |
|
|
2478 |
|
|
2479 |
-- |
|
2469 | 2480 |
-- Name: schema_oid(text); Type: FUNCTION; Schema: util; Owner: - |
2470 | 2481 |
-- |
2471 | 2482 |
|
Also available in: Unified diff
schemas/util.sql: added schema_matches()