{"Entry":{"collection":"catalog","key":"pg_cast","name":"pg_cast","aliases":[],"metadata":{"changed_in":["8.4","12"],"changes":[{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Indicates what contexts the cast may be invoked in. e means only as an explicit cast (using CAST, ::, or function-call syntax). a means implicitly in assignment to a target column, as well as explicitly. i means implicitly in expressions, as well as the other cases.","name":"castcontext","to":"Indicates what contexts the cast may be invoked in. e means only as an explicit cast (using CAST or :: syntax). a means implicitly in assignment to a target column, as well as explicitly. i means implicitly in expressions, as well as the other cases."}],"from":"7.4","listing":[],"order":false,"removed":[],"status":"reworded","to":"8.0","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Indicates what contexts the cast may be invoked in. e means only as an explicit cast (using CAST or :: syntax). a means implicitly in assignment to a target column, as well as explicitly. i means implicitly in expressions, as well as the other cases.","name":"castcontext","to":"Indicates what contexts the cast may be invoked in. e means only as an explicit cast (using CAST or :: syntax). a means implicitly in assignment to a target column, as well as explicitly. i means implicitly in expressions, as well as the other cases"},{"from":"The OID of the function to use to perform this cast. Zero is stored if the data types are binary compatible (that is, no run-time operation is needed to perform the cast).","name":"castfunc","to":"The OID of the function to use to perform this cast. Zero is stored if the data types are binary compatible (that is, no run-time operation is needed to perform the cast)"}],"from":"8.1","listing":[],"order":false,"removed":[],"status":"reworded","to":"8.2","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[{"from":"Indicates what contexts the cast may be invoked in. e means only as an explicit cast (using CAST or :: syntax). a means implicitly in assignment to a target column, as well as explicitly. i means implicitly in expressions, as well as the other cases","name":"castcontext","to":"Indicates what contexts the cast can be invoked in. e means only as an explicit cast (using CAST or :: syntax). a means implicitly in assignment to a target column, as well as explicitly. i means implicitly in expressions, as well as the other cases"}],"from":"8.2","listing":[],"order":false,"removed":[],"status":"reworded","to":"8.3","types":[],"unlisted":[]},{"added":["castmethod"],"attributes":[],"description_changed":true,"descriptions":[{"from":"The OID of the function to use to perform this cast. Zero is stored if the data types are binary compatible (that is, no run-time operation is needed to perform the cast)","name":"castfunc","to":"The OID of the function to use to perform this cast. Zero is stored if the cast method doesn't require a function."}],"from":"8.3","listing":[],"order":false,"removed":[],"status":"changed","to":"8.4","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Indicates what contexts the cast can be invoked in. e means only as an explicit cast (using CAST or :: syntax). a means implicitly in assignment to a target column, as well as explicitly. i means implicitly in expressions, as well as the other cases","name":"castcontext","to":"Indicates what contexts the cast can be invoked in. e means only as an explicit cast (using CAST or :: syntax). a means implicitly in assignment to a target column, as well as explicitly. i means implicitly in expressions, as well as the other cases."},{"from":"Indicates how the cast is performed. f means that the function specified in the castfunc field is used. i means that the input/output functions are used. b means that the types are binary-coercible, thus no conversion is required","name":"castmethod","to":"Indicates how the cast is performed. f means that the function specified in the castfunc field is used. i means that the input/output functions are used. b means that the types are binary-coercible, thus no conversion is required."}],"from":"8.4","listing":[],"order":false,"removed":[],"status":"reworded","to":"9.0","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[],"from":"9.1","listing":[],"order":false,"removed":[],"status":"reworded","to":"9.2","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[],"from":"9.6","listing":[],"order":false,"removed":[],"status":"reworded","to":"10","types":[],"unlisted":[]},{"added":[],"attributes":[{"attribute":"hidden","from":true,"name":"oid","to":false}],"description_changed":false,"descriptions":[],"from":"11","listing":[],"order":false,"removed":[],"status":"changed","to":"12","types":[],"unlisted":[]}],"column_count":6,"content_hash":"a6aa5837daac5e6f0136d9a9826789269bda872330f009de84b1386102dfdd3c","derived_content_hash":"babe60769bdbf9dbd73039b7e4ab8b66909ed3487031754b1a677f867b559cdb","first_version":"7.4","imported_at":"2026-09-30T00:40:55.399056+08:00","kind":"catalog","last_version":"20","name":"pg_cast","position":13,"present_in":["7.4","8.0","8.1","8.2","8.3","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"],"relation_oid":null,"relkind":"r","shared":false,"source_rev":"catalog-bilingual-repair:6cdc0be5f76031f6786cf342fbde4ab538ba69c592f71b9c1e87d86d5776de4a","summary":"The catalog pg_cast stores data type conversion paths, both built-in and user-defined.","summary_zh":"目录 pg_cast 存储数据类型转换路径，包括内置路径和用户定义路径。"}},"Definition":{"Collection":"catalog","Key":"pg_cast","SourceDatabase":"center","Version":"18","SourceTable":"catalog","SourceKey":"pg_cast","SourceRevision":"catalog-bilingual-repair:6cdc0be5f76031f6786cf342fbde4ab538ba69c592f71b9c1e87d86d5776de4a","Facts":{"columns":[{"array_dimensions":0,"attnum":1,"description":"Row identifier","description_zh":"行标识符","documented":true,"documented_name":"oid","hidden":false,"name":"oid","not_null":true,"references":"","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":2,"description":"OID of the source data type","description_zh":"源数据类型的 OID","documented":true,"documented_name":"castsource","hidden":false,"name":"castsource","not_null":true,"references":"pg_type.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":3,"description":"OID of the target data type","description_zh":"目标数据类型的 OID","documented":true,"documented_name":"casttarget","hidden":false,"name":"casttarget","not_null":true,"references":"pg_type.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":4,"description":"The OID of the function to use to perform this cast. Zero is stored if the cast method doesn't require a function.","description_zh":"执行该转换的函数的 OID。如果该转换方法不需要一个函数则存储 0。","documented":true,"documented_name":"castfunc","hidden":false,"name":"castfunc","not_null":true,"references":"pg_proc.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":5,"description":"Indicates what contexts the cast can be invoked in. e means only as an explicit cast (using CAST or :: syntax). a means implicitly in assignment to a target column, as well as explicitly. i means implicitly in expressions, as well as the other cases.","description_zh":"指示可在哪些上下文中调用此类型转换。e 表示只能显式调用（使用 CAST 或 :: 语法）。a 表示可在向目标列赋值时隐式调用，也可显式调用。i 表示可在表达式中隐式调用，也允许前述其他调用方式。","documented":true,"documented_name":"castcontext","hidden":false,"name":"castcontext","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":6,"description":"Indicates how the cast is performed. f means that the function specified in the castfunc field is used. i means that the input/output functions are used. b means that the types are binary-coercible, thus no conversion is required.","description_zh":"指示转换如何被执行。f 表明使用 castfunc 中指定的函数。i 表明使用输入/输出函数。b 表明该类型是二进制可强制转换的，因此不需要转换。","documented":true,"documented_name":"castmethod","hidden":false,"name":"castmethod","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"}],"description":"The catalog pg_cast stores data type conversion paths, both built-in and user-defined.\n\nIt should be noted that pg_cast does not represent every type conversion that the system knows how to perform; only those that cannot be deduced from some generic rule. For example, casting between a domain and its base type is not explicitly represented in pg_cast. Another important exception is that “automatic I/O conversion casts”, those performed using a data type's own I/O functions to convert to or from text or other string types, are not explicitly represented in pg_cast.","description_zh":"目录 pg_cast 存储数据类型转换路径，包括内置路径和用户定义路径。\n\n需要注意的是，pg_cast 并不表示系统知道如何执行的所有类型转换，它只包括那些不能从某些通用规则推导出的转换。例如，一个域及其基础类型之间的转换并未显式地在 pg_cast 中展示。另一个重要的例外是“自动的基于 I/O 的类型转换”，它们通过数据类型自己的 I/O 函数来转换成（或者转换自）text 或其他字符串类型，这些转换也没有显式地在 pg_cast 中表示。","description_zh_html":"\u003cp\u003e目录 pg_cast 存储数据类型转换路径，包括内置路径和用户定义路径。\u003c/p\u003e\n\u003cp\u003e需要注意的是，pg_cast 并不表示系统知道如何执行的所有类型转换，它只包括那些不能从某些通用规则推导出的转换。例如，一个域及其基础类型之间的转换并未显式地在 pg_cast 中展示。另一个重要的例外是“自动的基于 I/O 的类型转换”，它们通过数据类型自己的 I/O 函数来转换成（或者转换自）text 或其他字符串类型，这些转换也没有显式地在 pg_cast 中表示。\u003c/p\u003e","doc":{"anchor":"id-1.10.4.12.5","file":"catalog-pg-cast.html","lang":"en","sha256":"f501c9340132488ecf887782e1a56a7352ba1a4f62082a80a5b02432292f26b7","slug":"18"},"kind":"catalog","lang":"en","measured_attributes":true,"metadata_release":"18.6","runtime_columns":["oid","castsource","casttarget","castfunc","castcontext","castmethod"],"runtime_verified":false,"source":"english-manual","sources":[{"evidence":[{"build_id":107,"kind":"same-version-manual","locale":"zh-Hans","page":"catalog-pg-cast.html","sha256":"bc25b92b7e3136e7045cd7144e7ed6eb100a93664db25d1c3fbbe88514ad9f00","source_revision":"unknown:rendered-translation-baseline","translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","version":"18"}],"kind":"catalog-bilingual-repair","prior_source_revision":"english-manuals:06160dbb2681f321547840547d21b8a606ed3293a91577f91251a8fa19ff3918","version":"18"}],"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"id-1.10.4.12.5","file":"catalog-pg-cast.html","lang":"en","sha256":"f501c9340132488ecf887782e1a56a7352ba1a4f62082a80a5b02432292f26b7","slug":"18"},"sources":[{"evidence":[{"build_id":107,"kind":"same-version-manual","locale":"zh-Hans","page":"catalog-pg-cast.html","sha256":"bc25b92b7e3136e7045cd7144e7ed6eb100a93664db25d1c3fbbe88514ad9f00","source_revision":"unknown:rendered-translation-baseline","translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","version":"18"}],"kind":"catalog-bilingual-repair","prior_source_revision":"english-manuals:06160dbb2681f321547840547d21b8a606ed3293a91577f91251a8fa19ff3918","version":"18"}]},"MeasuredEvidence":{"measured_attributes":true,"metadata_release":"18.6","runtime_columns":["oid","castsource","casttarget","castfunc","castcontext","castmethod"],"runtime_verified":false}},"Text":{"Collection":"catalog","Key":"pg_cast","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_cast","Summary":"The catalog pg_cast stores data type conversion paths, both built-in and user-defined.\n\nIt should be noted that pg_cast does not represent every type conversion that the system knows how to perform; only those that cannot be deduced from some generic rule. For example, casting between a domain and its base type is not explicitly represented in pg_cast. Another important exception is that “automatic I/O conversion casts”, those performed using a data type's own I/O functions to convert to or from text or other string types, are not explicitly represented in pg_cast.","BodyHTML":"\u003cp\u003eThe catalog pg_cast stores data type conversion paths, both built-in and user-defined.\n\nIt should be noted that pg_cast does not represent every type conversion that the system knows how to perform; only those that cannot be deduced from some generic rule. For example, casting between a domain and its base type is not explicitly represented in pg_cast. Another important exception is that “automatic I/O conversion casts”, those performed using a data type\u0026#39;s own I/O functions to convert to or from text or other string types, are not explicitly represented in pg_cast.\u003c/p\u003e","SourceRevision":"catalog-bilingual-repair:6cdc0be5f76031f6786cf342fbde4ab538ba69c592f71b9c1e87d86d5776de4a","ContentHash":"cdfa87d8cde7c2c9f5603766d01ba1461a187eb26d3a91876971dd4db245afb2","Payload":{"columns":[{"array_dimensions":0,"attnum":1,"description":"Row identifier","description_zh":"行标识符","documented":true,"documented_name":"oid","hidden":false,"name":"oid","not_null":true,"references":"","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":2,"description":"OID of the source data type","description_zh":"源数据类型的 OID","documented":true,"documented_name":"castsource","hidden":false,"name":"castsource","not_null":true,"references":"pg_type.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":3,"description":"OID of the target data type","description_zh":"目标数据类型的 OID","documented":true,"documented_name":"casttarget","hidden":false,"name":"casttarget","not_null":true,"references":"pg_type.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":4,"description":"The OID of the function to use to perform this cast. Zero is stored if the cast method doesn't require a function.","description_zh":"执行该转换的函数的 OID。如果该转换方法不需要一个函数则存储 0。","documented":true,"documented_name":"castfunc","hidden":false,"name":"castfunc","not_null":true,"references":"pg_proc.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":5,"description":"Indicates what contexts the cast can be invoked in. e means only as an explicit cast (using CAST or :: syntax). a means implicitly in assignment to a target column, as well as explicitly. i means implicitly in expressions, as well as the other cases.","description_zh":"指示可在哪些上下文中调用此类型转换。e 表示只能显式调用（使用 CAST 或 :: 语法）。a 表示可在向目标列赋值时隐式调用，也可显式调用。i 表示可在表达式中隐式调用，也允许前述其他调用方式。","documented":true,"documented_name":"castcontext","hidden":false,"name":"castcontext","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":6,"description":"Indicates how the cast is performed. f means that the function specified in the castfunc field is used. i means that the input/output functions are used. b means that the types are binary-coercible, thus no conversion is required.","description_zh":"指示转换如何被执行。f 表明使用 castfunc 中指定的函数。i 表明使用输入/输出函数。b 表明该类型是二进制可强制转换的，因此不需要转换。","documented":true,"documented_name":"castmethod","hidden":false,"name":"castmethod","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"}],"description":"The catalog pg_cast stores data type conversion paths, both built-in and user-defined.\n\nIt should be noted that pg_cast does not represent every type conversion that the system knows how to perform; only those that cannot be deduced from some generic rule. For example, casting between a domain and its base type is not explicitly represented in pg_cast. Another important exception is that “automatic I/O conversion casts”, those performed using a data type's own I/O functions to convert to or from text or other string types, are not explicitly represented in pg_cast."}},"RequestedLocale":"en","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
