bytea
二进制数据(“字节数组”)
当前查看 PostgreSQL 18。
中文定义与说明
二进制数据(“字节数组”)
同版本中文手册定义
bytea | 1 或 4 字节外加真正的二进制串 | 变长二进制串 |
PG10–20 核心源码清单。类型转换与操作符类列出源码显式声明的关系;缺少记录不能排除通过其他机制进行转换或使用索引。
定义
二进制数据(“字节数组”)
bytea
- 目录名称
- pg_catalog.bytea
- 类型 OID
- 17
- 类型种类
- 基础类型
- 声明长度
- 变长(varlena)
- 存储策略
- 扩展
- 输入函数
- byteain
- 输出函数
- byteaout
- 手册中的声明
- bytea
- 存储大小
- 1 或 4 字节,加上实际二进制串
- 手册说明
- 变长二进制串
系统目录属性
此构建的源码初始化值。字段含义参见 pg_type 。包含头文件默认值;依赖构建的常量保留符号形式,不作为服务器运行时实测。
oid17descrvariable-length string, binary values escapedtypacl_null_typlen-1typelem0typnamebyteatypsendbyteasendtyptypebtypalignityparray0typbyvalftypdelim','typinputbyteaintypmodin-typndims0typownerPOSTGREStyprelid0typmodout-typoutputbyteaouttyptypmod-1typanalyze-typdefault_null_typnotnullftypreceivebytearecvtypstoragextypbasetype0typcategoryUtypcollation0typisdefinedttypnamespacepg_catalogtypsubscript-typdefaultbin_null_array_type_oid1001typispreferredfarray_type_name_bytea
类型转换 9
与此类型相关的显式 pg_cast 记录。PostgreSQL 还支持 pg_cast 之外的类型转换,缺少记录不能证明转换不可能。
运算符重载 9
每种操作数签名均为独立重载。实现函数和返回类型来自同一源码构建。
操作符类 4
声明输入类型与此类型相符的操作符类。多态操作符类、类型转换和表达式索引还可能提供其他索引路径;不能仅凭此表判断是否支持索引。
版本比较
PostgreSQL 17 → 18。属性比较不包含构建标识和说明正文;原始目录字段与源描述保留原文。
类型转换
PostgreSQL 17
[{"castcontext": "i", "castfunc": "0", "castmethod": "b", "castsource": "pg_dependencies", "casttarget": "bytea"}, {"castcontext": "i", "castfunc": "0", "castmethod": "b", "castsource": "pg_mcv_list", "casttarget": "bytea"}, {"castcontext": "i", "castfunc": "0", "castmethod": "b", "castsource": "pg_ndistinct", "casttarget": "bytea"}]PostgreSQL 18
[{"castcontext": "e", "castfunc": "bytea(int2)", "castmethod": "f", "castsource": "int2", "casttarget": "bytea"}, {"castcontext": "e", "castfunc": "bytea(int4)", "castmethod": "f", "castsource": "int4", "casttarget": "bytea"}, {"castcontext": "e", "castfunc": "bytea(int8)", "castmethod": "f", "castsource": "int8", "casttarget": "bytea"}, {"castcontext": "e", "castfunc": "int2(bytea)", "castmethod": "f", "castsource": "bytea", "casttarget": "int2"}, {"castcontext": "e", "castfunc": "int4(bytea)", "castmethod": "f", "castsource": "bytea", "casttarget": "int4"}, {"castcontext": "e", "castfunc": "int8(bytea)", "castmethod": "f", "castsource": "bytea", "casttarget": "int8"}, {"castcontext": "i", "castfunc": "0", "castmethod": "b", "castsource": "pg_dependencies", "casttarget": "bytea"}, {"castcontext": "i", "castfunc": "0", "castmethod": "b", "castsource": "pg_mcv_list", "casttarget": "bytea"}, {"castcontext": "i", "castfunc": "0", "castmethod": "b", "castsource": "pg_ndistinct", "casttarget": "bytea"}]文档与源码
- 构建
- 18.6 · https://ftp.postgresql.org/pub/source/v18.6/postgresql-18.6.tar.bz2
- 指纹
555610c24d53e4316da5b7d3fc25c279d96856d5e0e23ee308c328c5fa881d9f
相关条目
全部数据类型 · 下载此版本 JSON · 最早收录的样本不代表该类型的实际引入版本。