Revision 10112
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/util.sql | ||
---|---|---|
1110 | 1110 |
|
1111 | 1111 |
|
1112 | 1112 |
-- |
1113 |
-- Name: table_schema(regclass); Type: FUNCTION; Schema: util; Owner: - |
|
1114 |
-- |
|
1115 |
|
|
1116 |
CREATE FUNCTION table_schema(table_ regclass) RETURNS text |
|
1117 |
LANGUAGE sql STABLE STRICT |
|
1118 |
AS $_$ |
|
1119 |
SELECT nspname::text FROM pg_namespace WHERE oid = (SELECT relnamespace FROM pg_class WHERE oid = $1) |
|
1120 |
$_$; |
|
1121 |
|
|
1122 |
|
|
1123 |
-- |
|
1113 | 1124 |
-- Name: to_global_col_names(regclass); Type: FUNCTION; Schema: util; Owner: - |
1114 | 1125 |
-- |
1115 | 1126 |
|
Also available in: Unified diff
schemas/util.sql: added table_schema()