22P07 Datum version mismatch
A composite datum and its tuple descriptor have incompatible row-type versions.
English manual coverage begins with PostgreSQL 8.1. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- aliases
- Unknown
- class name
- Data Exception
- condition name
- datum_version_mismatch
- lang
- en
- minimum minor
- 18.7
- sqlstate
- 22P07
Definition PG 18
SQLSTATE 22P07 (datum_version_mismatch) belongs to class 22, Data Exception. Its source macro is ERRCODE_DATUM_VERSION_MISMATCH.
A composite datum and its tuple descriptor have incompatible row-type versions. In PostgreSQL 19rc2, the source reports either “row type of datum tuple was altered after the datum's creation” or “using outdated tuple descriptor when deforming row type”, and directs the reader to the server log for details. Inspect the preceding type or table definition changes and the server log when diagnosing this condition.
The code is present in 14.25, 15.20, 16.16, 17.12, 18.7, 19rc2. It is absent from each immediately preceding release: 14.24, 15.19, 16.15, 17.11, 18.6 and 19rc1. These are separate branch boundaries; the code was backpatched to supported branches and is not exclusive to PostgreSQL 19. Earlier minor releases within these major versions do not define it. The retained PostgreSQL 20 development snapshot has not been advanced by this update.
Definition and message evidence comes from the fixed release sources, including PostgreSQL 19rc2 heaptuple.c. No runtime reproduction was performed for this entry.
Compare versions
SQLSTATE evidence and recorded runtime versions
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"
}Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · f5c41f6681c910b3f69951bf6fb97c6d74605d25
Text language: en · sqlstate-20261112:4436530af7c8a50b58a92aa7598f7d6d2e01a7154aedcc94d47eb25c1905c9be