dump - Export data types from PostgreSQL schema -
i'd export data types postgresql specific schema. problem is, found way export whole schema , not data types. schema has more 2000 tables, , don't need this. there way export custom data types?
this gets list of available datatypes - custom ones need filter first column (nspname):
select n.nspname, typname, pg_catalog.format_type(t.oid, null) typefull pg_catalog.pg_type t left join pg_catalog.pg_namespace n on n.oid = t.typnamespace (t.typrelid = 0 or (select c.relkind = 'c' pg_catalog.pg_class c c.oid = t.typrelid)) , not exists(select 1 pg_catalog.pg_type el el.oid = t.typelem , el.typarray = t.oid) , pg_catalog.pg_type_is_visible(t.oid)
Comments
Post a Comment