22P07 数据值版本不匹配
复合类型数据与元组描述符的行类型版本不兼容。
英文手册覆盖始于 PostgreSQL 8.1. 来源历史与运行验证各自保留独立版本边界。
当前阅读 PG 18·选择有来源记录的版本
- aliases
- 未知
- class name
- Data Exception
- condition name
- datum_version_mismatch
- lang
- en
- minimum minor
- 18.7
- sqlstate
- 22P07
版本定义 PG 18
SQLSTATE 22P07(datum_version_mismatch)属于 22 类“数据异常”,源码宏为 ERRCODE_DATUM_VERSION_MISMATCH。
复合类型数据与元组描述符的行类型版本不兼容。 PostgreSQL 19rc2 源码在此处报告“数据创建后,其元组的行类型已被修改”或“解构行类型时使用了过期的元组描述符”,并提示查看服务器日志。排查时应核对此前的类型或表结构变更,以及服务器日志中的详细信息。
此错误码已收录于 14.25, 15.20, 16.16, 17.12, 18.7, 19rc2,而各分支紧邻的上一版 14.24、15.19、16.15、17.11、18.6、19rc1 均未定义它。这些是分别核对的小版本边界:该码已回补至稳定分支,并非 PG19 独有;不能据此认为这些大版本的所有早期小版本都包含它。本次未推进已封存的 PG20 开发快照。
定义与报文依据固定发布源码核对,参见 PostgreSQL 19rc2 的 heaptuple.c。本条目没有新增运行时复现实测。
比较版本
SQLSTATE 证据与已记录的运行版本
sources · errcodes.14
{
"commit": "9adcf5f8847e0f485a390b1d3ea40688068d71bd",
"docs_url": "https://www.postgresql.org/docs/14/errcodes-appendix.html",
"kind": "upstream_source",
"location": "204",
"path": "src/backend/utils/errcodes.txt",
"position": 0,
"sha256": "d8a01ebc162a874b800db97e3677f642e6dd6a5161d4a7111821ddc38fd4f555",
"source_id": "errcodes.14",
"tag": "REL_14_25",
"url": "https://github.com/postgres/postgres/blob/9adcf5f8847e0f485a390b1d3ea40688068d71bd/src/backend/utils/errcodes.txt#L204"
}sources · errcodes.15
{
"commit": "6a84c5137e820f46f0123276f546eec5b9a56e70",
"docs_url": "https://www.postgresql.org/docs/15/errcodes-appendix.html",
"kind": "upstream_source",
"location": "204",
"path": "src/backend/utils/errcodes.txt",
"position": 1,
"sha256": "0000d73a83aa1907cf1fd1262cd781b32086720619892361e35bbc6bfa2a7a83",
"source_id": "errcodes.15",
"tag": "REL_15_20",
"url": "https://github.com/postgres/postgres/blob/6a84c5137e820f46f0123276f546eec5b9a56e70/src/backend/utils/errcodes.txt#L204"
}sources · errcodes.16
{
"commit": "c0534eb02de050ac1035ad7b3ad7c3f02980f153",
"docs_url": "https://www.postgresql.org/docs/16/errcodes-appendix.html",
"kind": "upstream_source",
"location": "204",
"path": "src/backend/utils/errcodes.txt",
"position": 2,
"sha256": "9f95161e1438d3f06db7e5a81514b4e59b7ddb221f1f2eac63a804a2c225177f",
"source_id": "errcodes.16",
"tag": "REL_16_16",
"url": "https://github.com/postgres/postgres/blob/c0534eb02de050ac1035ad7b3ad7c3f02980f153/src/backend/utils/errcodes.txt#L204"
}sources · errcodes.17
{
"commit": "702b3dc86d35bcc08c8e23cffa3c4d9fe9d32c85",
"docs_url": "https://www.postgresql.org/docs/17/errcodes-appendix.html",
"kind": "upstream_source",
"location": "204",
"path": "src/backend/utils/errcodes.txt",
"position": 3,
"sha256": "4fe9deea25725fa04e8374b07587a2f2335cea1b586592be583ae3a1af804571",
"source_id": "errcodes.17",
"tag": "REL_17_12",
"url": "https://github.com/postgres/postgres/blob/702b3dc86d35bcc08c8e23cffa3c4d9fe9d32c85/src/backend/utils/errcodes.txt#L204"
}sources · errcodes.18
{
"commit": "f5c41f6681c910b3f69951bf6fb97c6d74605d25",
"docs_url": "https://www.postgresql.org/docs/18/errcodes-appendix.html",
"kind": "upstream_source",
"location": "210",
"path": "src/backend/utils/errcodes.txt",
"position": 4,
"sha256": "b8b7f9f0e3238bcd0db4de2a938be2ee7a145721974c59fa6b4239eb34581bd2",
"source_id": "errcodes.18",
"tag": "REL_18_7",
"url": "https://github.com/postgres/postgres/blob/f5c41f6681c910b3f69951bf6fb97c6d74605d25/src/backend/utils/errcodes.txt#L210"
}sources · errcodes.19
{
"commit": "dffcca2e3c81178c64d4c1f44543a3507d0b7508",
"docs_url": "https://www.postgresql.org/docs/19/errcodes-appendix.html",
"kind": "upstream_source",
"location": "210",
"path": "src/backend/utils/errcodes.txt",
"position": 5,
"sha256": "21ed56c2fe97a7f4f324a3d02a984211b04db43a032f1b04046f0511fcac1c14",
"source_id": "errcodes.19",
"tag": "REL_19_RC2",
"url": "https://github.com/postgres/postgres/blob/dffcca2e3c81178c64d4c1f44543a3507d0b7508/src/backend/utils/errcodes.txt#L210"
}来源引用
定义来源
center · PostgreSQL 18 · f5c41f6681c910b3f69951bf6fb97c6d74605d25
正文语言: zh-Hans · sqlstate-20261112:4436530af7c8a50b58a92aa7598f7d6d2e01a7154aedcc94d47eb25c1905c9be