Код: Выделить всё
SELECT n.nspname = ANY(current_schemas(true)), n.nspname, t.typname
FROM pg_catalog.pg_type t JOIN pg_catalog.pg_namespace n ON t.typnamespace = n.oid
WHERE t.oid = $1
parameters: $1 = '3802'
SELECT typinput='pg_catalog.array_in'::regproc as is_array, typtype, typname, pg_type.oid FROM pg_catalog.pg_type
LEFT JOIN (select ns.oid as nspoid, ns.nspname, r.r from pg_namespace as ns join ( select s.r, (current_schemas(false))[s.r] as nspname from generate_series(1, array_upper(current_schemas(false), 1)) as s(r) ) as r using ( nspname ) ) as sp
ON sp.nspoid = typnamespace WHERE pg_type.oid = $1 ORDER BY sp.r, pg_type.oid DESC
parameters: $1 = '3802'
Код: Выделить всё
-[ RECORD 1 ]--------
?column? | t
nspname | pg_catalog
typname | jsonb
-[ RECORD 1 ]---
is_array | f
typtype | b
typname | jsonb
oid | 3802
Подробнее здесь: https://stackoverflow.com/questions/782 ... type-table