to_regtype ( text ) → regtypeParses a string of text, extracts a potential type name from it, and translates that name into a type OID. A syntax error in the string will result in an error; but if the string is a syntactically valid type name that happens not to be found in the catalogs, the result is
NULL. A similar result is obtained by casting the string to type regtype (see Section 8.19), except that that will throw error for name not found.