Revision 10794
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/util.sql | ||
---|---|---|
1501 | 1501 |
|
1502 | 1502 |
|
1503 | 1503 |
-- |
1504 |
-- Name: schema(regtype); Type: FUNCTION; Schema: util; Owner: - |
|
1505 |
-- |
|
1506 |
|
|
1507 |
CREATE FUNCTION schema(type regtype) RETURNS text |
|
1508 |
LANGUAGE sql STABLE |
|
1509 |
AS $_$ |
|
1510 |
SELECT nspname::text |
|
1511 |
FROM pg_type |
|
1512 |
JOIN pg_namespace ON pg_namespace.oid = typnamespace |
|
1513 |
WHERE pg_type.oid = $1 |
|
1514 |
$_$; |
|
1515 |
|
|
1516 |
|
|
1517 |
-- |
|
1518 |
-- Name: schema(anyelement); Type: FUNCTION; Schema: util; Owner: - |
|
1519 |
-- |
|
1520 |
|
|
1521 |
CREATE FUNCTION schema(type_null anyelement) RETURNS text |
|
1522 |
LANGUAGE sql STABLE |
|
1523 |
AS $_$ |
|
1524 |
SELECT util.schema(pg_typeof($1)) |
|
1525 |
$_$; |
|
1526 |
|
|
1527 |
|
|
1528 |
-- |
|
1504 | 1529 |
-- Name: search_path_append(text); Type: FUNCTION; Schema: util; Owner: - |
1505 | 1530 |
-- |
1506 | 1531 |
|
Also available in: Unified diff
schemas/util.sql: added schema(regtype), schema(anyelement)