SELECT typname
FROM pg_type t JOIN pg_namespace n ON t.typnamespace = n.oid
WHERE n.nspname = '$pgSchema' AND (t.typtype = 'c' and t.typattrs is not null or t.typtype in ('N','V') and typstorage='p')
ORDER BY typname;