{"Entry":{"collection":"func","key":"pg-typeof","name":"pg_typeof","aliases":[],"metadata":{"changed_in":[],"changes":[{"descriptions_changed":false,"doc_overhaul":false,"from":"8.3","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"added","to":"8.4"},{"descriptions_changed":false,"doc_overhaul":true,"from":"12","group_changed":null,"signatures":{"added":[],"removed":[]},"status":"changed","to":"13"}],"content_hash":"f68bcd70f41887ea21487535fba47c2d8528c5ed6dff07ffab9cfdabd7bdc1e8","first_version":"8.4","group":"info","group_label":"System Information Functions And Operators","groups":["info"],"imported_at":"2026-09-27T17:57:29.324998+08:00","last_version":"20","name":"pg_typeof","name_key":"pg_typeof","position":28113,"present_in":["8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"signature":"pg_typeof ( \"any\" ) → regtype","signature_count":1,"slug":"pg-typeof","source_rev":"b7bd9cda","summary":"Returns the OID of the data type of the value that is passed to it.","summary_zh":""}},"Definition":{"Collection":"func","Key":"pg-typeof","SourceDatabase":"center","Version":"18","SourceTable":"func","SourceKey":"pg-typeof","SourceRevision":"b7bd9cda","Facts":{"description":"Returns the OID of the data type of the value that is passed to it. This can be helpful for troubleshooting or dynamically constructing SQL queries. The function is declared as returning regtype, which is an OID alias type (see Section 8.19); this means that it is the same as an OID for comparison purposes but displays as a type name.","description_html":"Returns the OID of the data type of the value that is passed to it. This can be helpful for troubleshooting or dynamically constructing SQL queries. The function is declared as returning \u003ccode class=\"type\"\u003eregtype\u003c/code\u003e, which is an OID alias type (see \u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. Object Identifier Types\"\u003eSection 8.19\u003c/a\u003e); this means that it is the same as an OID for comparison purposes but displays as a type name.","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":"Returns the OID of the data type of the value that is passed to it. This can be helpful for troubleshooting or dynamically constructing SQL queries. The function is declared as returning regtype, which is an OID alias type (see Section 8.19); this means that it is the same as an OID for comparison purposes but displays as a type name.","description_html":"Returns the OID of the data type of the value that is passed to it. This can be helpful for troubleshooting or dynamically constructing SQL queries. The function is declared as returning \u003ccode class=\"type\"\u003eregtype\u003c/code\u003e, which is an OID alias type (see \u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. Object Identifier Types\"\u003eSection 8.19\u003c/a\u003e); this means that it is the same as an OID for comparison purposes but displays as a type name.","description_zh":"","description_zh_html":"","examples":[{"expr":"pg_typeof(33)","result":"integer"}],"html":"\u003ccode class=\"function\"\u003epg_typeof\u003c/code\u003e ( \u003ccode class=\"type\"\u003e\"any\"\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eregtype\u003c/code\u003e","returns":"regtype","text":"pg_typeof ( \"any\" ) → regtype","zh_from":""}],"zh_from":""},"ManualEvidence":{"doc":{"anchor":"FUNCTIONS-INFO-CATALOG-TABLE","file":"functions-info.html","slug":"18"}},"MeasuredEvidence":{}},"Text":{"Collection":"func","Key":"pg-typeof","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_typeof","Summary":"返回所传入值的数据类型的 OID。这有助于排查问题或动态构造 SQL 查询。函数声明的返回类型是regtype，它是一种 OID 别名类型（参见第 8.19 节）；这意味着它在比较时与 OID 相同，但显示为类型名。","BodyHTML":"返回所传入值的数据类型的 OID。这有助于排查问题或动态构造 SQL 查询。函数声明的返回类型是\u003ccode\u003eregtype\u003c/code\u003e，它是一种 OID 别名类型（参见\u003ca href=\"/docs/18/datatype-oid.html\" rel=\"nofollow\"\u003e第 8.19 节\u003c/a\u003e）；这意味着它在比较时与 OID 相同，但显示为类型名。\u003cpre\u003epg_typeof ( \u0026#34;any\u0026#34; ) → regtype\u003c/pre\u003e返回所传入值的数据类型的 OID。这有助于排查问题或动态构造 SQL 查询。函数声明的返回类型是\u003ccode\u003eregtype\u003c/code\u003e，它是一种 OID 别名类型（参见\u003ca href=\"/docs/18/datatype-oid.html\" rel=\"nofollow\"\u003e第 8.19 节\u003c/a\u003e）；这意味着它在比较时与 OID 相同，但显示为类型名。","SourceRevision":"ca936764","ContentHash":"ce5a72ae7387610a3caf45b0c3c10abacbcaf582f9c7ae6e4584a4f7c6599d02","Payload":{"description_zh":"返回所传入值的数据类型的 OID。这有助于排查问题或动态构造 SQL 查询。函数声明的返回类型是regtype，它是一种 OID 别名类型（参见第 8.19 节）；这意味着它在比较时与 OID 相同，但显示为类型名。","description_zh_html":"返回所传入值的数据类型的 OID。这有助于排查问题或动态构造 SQL 查询。函数声明的返回类型是\u003ccode class=\"type\"\u003eregtype\u003c/code\u003e，它是一种 OID 别名类型（参见\u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. 对象标识符类型\"\u003e第 8.19 节\u003c/a\u003e）；这意味着它在比较时与 OID 相同，但显示为类型名。","signatures":[{"description_zh":"返回所传入值的数据类型的 OID。这有助于排查问题或动态构造 SQL 查询。函数声明的返回类型是regtype，它是一种 OID 别名类型（参见第 8.19 节）；这意味着它在比较时与 OID 相同，但显示为类型名。","description_zh_html":"返回所传入值的数据类型的 OID。这有助于排查问题或动态构造 SQL 查询。函数声明的返回类型是\u003ccode class=\"type\"\u003eregtype\u003c/code\u003e，它是一种 OID 别名类型（参见\u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. 对象标识符类型\"\u003e第 8.19 节\u003c/a\u003e）；这意味着它在比较时与 OID 相同，但显示为类型名。","returns":"regtype","text":"pg_typeof ( \"any\" ) → regtype","zh_from":"doc"}],"zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":[{"Version":"18","Ordinal":0,"Hash":"d37a2067efb299964ecffb7229cc0dd1faa84641cc1911812b282d94387b99b6","Text":"pg_typeof ( \"any\" ) → regtype","Returns":"regtype","Payload":{"description":"Returns the OID of the data type of the value that is passed to it. This can be helpful for troubleshooting or dynamically constructing SQL queries. The function is declared as returning regtype, which is an OID alias type (see Section 8.19); this means that it is the same as an OID for comparison purposes but displays as a type name.","description_html":"Returns the OID of the data type of the value that is passed to it. This can be helpful for troubleshooting or dynamically constructing SQL queries. The function is declared as returning \u003ccode class=\"type\"\u003eregtype\u003c/code\u003e, which is an OID alias type (see \u003ca href=\"/docs/18/datatype-oid.html\" title=\"8.19. Object Identifier Types\"\u003eSection 8.19\u003c/a\u003e); this means that it is the same as an OID for comparison purposes but displays as a type name.","description_zh":"","description_zh_html":"","examples":[{"expr":"pg_typeof(33)","result":"integer"}],"html":"\u003ccode class=\"function\"\u003epg_typeof\u003c/code\u003e ( \u003ccode class=\"type\"\u003e\"any\"\u003c/code\u003e ) → \u003ccode class=\"returnvalue\"\u003eregtype\u003c/code\u003e","returns":"regtype","text":"pg_typeof ( \"any\" ) → regtype","zh_from":""}}],"Spellings":null,"SQLState":null,"Evidence":null}
