{"Entry":{"collection":"func","key":"to-regtype","name":"to_regtype","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"9.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"9.4"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"},{"descriptions_changed":true,"doc_overhaul":false,"from":"15","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"16"},{"descriptions_changed":true,"doc_overhaul":false,"from":"16","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"17"}],"content_hash":"b411c68e7d99176c98da908f38aa6346950b2f5d27307e720fc65a0c6a4b5b42","first_version":"9.4","group":"info","group_label":"System Information Functions And Operators","groups":["info"],"imported_at":"2026-09-27T17:57:29.37083+08:00","last_version":"20","name":"to_regtype","name_key":"to_regtype","position":28132,"present_in":["9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"to_regtype ( text ) → regtype","signature_count":1,"slug":"to-regtype","source_rev":"b7bd9cda","summary":"Parses a string of text, extracts a potential type name from it, and translates that name into a type OID.","summary_zh":""}},"Definition":{"Collection":"func","Key":"to-regtype","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"to-regtype","SourceRevision":"b7bd9cda","Facts":{"description":"Parses 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.","description_html":"Parses 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 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. A similar result is obtained by casting the string to type \u003ccode class=\"type\"\u003eregtype\u003c/code\u003e (see \u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. Object Identifier Types\"\u003eSection 8.19\u003c/a\u003e), except that that will throw error for name not found.","description_zh":"","description_zh_html":"","doc":{"anchor":"FUNCTIONS-INFO-CATALOG-TABLE","file":"functions-info.html","slug":"18"},"group":"info","group_label":"System Information Functions And Operators","lang":"en","layout":"table-new","pages":["functions-info.html"],"prose_only":false,"signatures":[{"description":"Parses 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.","description_html":"Parses 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 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. A similar result is obtained by casting the string to type \u003ccode class=\"type\"\u003eregtype\u003c/code\u003e (see \u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. Object Identifier Types\"\u003eSection 8.19\u003c/a\u003e), except that that will throw error for name not found.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eto_regtype\u003c/code\u003e ( \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eregtype\u003c/code\u003e","returns":"regtype","text":"to_regtype ( text ) → regtype","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-INFO-CATALOG-TABLE","file":"functions-info.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"to-regtype","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"to_regtype","Summary":"解析文本字符串，从中提取可能的类型名，并将该名称转换为类型 OID。字符串中的语法错误会导致报错；但如果字符串是语法有效的类型名，只是在系统目录中找不到该类型，结果就是 NULL。将字符串转换为 regtype 类型也能得到类似的结果（参见第 8.19 节），区别在于类型转换会在找不到名称时报错。","BodyHTML":"解析文本字符串，从中提取可能的类型名，并将该名称转换为类型 OID。字符串中的语法错误会导致报错；但如果字符串是语法有效的类型名，只是在系统目录中找不到该类型，结果就是 \u003ccode\u003eNULL\u003c/code\u003e。将字符串转换为 \u003ccode\u003eregtype\u003c/code\u003e 类型也能得到类似的结果（参见\u003ca href=\"/docs/18/datatype-oid.html\" rel=\"nofollow\"\u003e第 8.19 节\u003c/a\u003e），区别在于类型转换会在找不到名称时报错。\u003cpre\u003eto_regtype ( text ) → regtype\u003c/pre\u003e解析文本字符串，从中提取可能的类型名，并将该名称转换为类型 OID。字符串中的语法错误会导致报错；但如果字符串是语法有效的类型名，只是在系统目录中找不到该类型，结果就是 \u003ccode\u003eNULL\u003c/code\u003e。将字符串转换为 \u003ccode\u003eregtype\u003c/code\u003e 类型也能得到类似的结果（参见\u003ca href=\"/docs/18/datatype-oid.html\" rel=\"nofollow\"\u003e第 8.19 节\u003c/a\u003e），区别在于类型转换会在找不到名称时报错。","SourceRevision":"ca936764","ContentHash":"0918c724b283965320a08f3da7e3ee1238f09fae1fa38e8c0636a26f32ba1d80","Payload":{"description_zh":"解析文本字符串，从中提取可能的类型名，并将该名称转换为类型 OID。字符串中的语法错误会导致报错；但如果字符串是语法有效的类型名，只是在系统目录中找不到该类型，结果就是 NULL。将字符串转换为 regtype 类型也能得到类似的结果（参见第 8.19 节），区别在于类型转换会在找不到名称时报错。","description_zh_html":"解析文本字符串，从中提取可能的类型名，并将该名称转换为类型 OID。字符串中的语法错误会导致报错；但如果字符串是语法有效的类型名，只是在系统目录中找不到该类型，结果就是 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。将字符串转换为 \u003ccode class=\"type\"\u003eregtype\u003c/code\u003e 类型也能得到类似的结果（参见\u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. 对象标识符类型\"\u003e第 8.19 节\u003c/a\u003e），区别在于类型转换会在找不到名称时报错。","signatures":[{"description_zh":"解析文本字符串，从中提取可能的类型名，并将该名称转换为类型 OID。字符串中的语法错误会导致报错；但如果字符串是语法有效的类型名，只是在系统目录中找不到该类型，结果就是 NULL。将字符串转换为 regtype 类型也能得到类似的结果（参见第 8.19 节），区别在于类型转换会在找不到名称时报错。","description_zh_html":"解析文本字符串，从中提取可能的类型名，并将该名称转换为类型 OID。字符串中的语法错误会导致报错；但如果字符串是语法有效的类型名，只是在系统目录中找不到该类型，结果就是 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e。将字符串转换为 \u003ccode class=\"type\"\u003eregtype\u003c/code\u003e 类型也能得到类似的结果（参见\u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. 对象标识符类型\"\u003e第 8.19 节\u003c/a\u003e），区别在于类型转换会在找不到名称时报错。","returns":"regtype","text":"to_regtype ( text ) → regtype","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"f4e4f08f74e6b3f3dbd62fafb8a92b833a40fe390173032d85717ec39be28605","Text":"to_regtype ( text ) → regtype","Returns":"regtype","Payload":{"description":"Parses 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.","description_html":"Parses 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 \u003ccode class=\"literal\"\u003eNULL\u003c/code\u003e. A similar result is obtained by casting the string to type \u003ccode class=\"type\"\u003eregtype\u003c/code\u003e (see \u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. Object Identifier Types\"\u003eSection 8.19\u003c/a\u003e), except that that will throw error for name not found.","description_zh":"","description_zh_html":"","examples":[],"html":"\u003ccode class=\"function\"\u003eto_regtype\u003c/code\u003e ( \u003ccode class=\"type\"\u003etext\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eregtype\u003c/code\u003e","returns":"regtype","text":"to_regtype ( text ) → regtype","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
