2203G — sql_json_item_cannot_be_cast_to_target_type
2203G is the catalogue condition sqljsonitemcannotbecasttotargettype. In the fixed PostgreSQL 18.6 tree, the bounded search found its macro in errcodes.txt but no core or contrib call that emits it. This is therefore a definition-only reference; a JSON conversion that merely looks similar is not evidence that the server used this SQLSTATE.
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
- sql_json_item_cannot_be_cast_to_target_type
- lang
- en
- sqlstate
- 2203G
Definition PG 18
2203G
At a glance {#at-a-glance}
2203G is the catalogue condition sql_json_item_cannot_be_cast_to_target_type. In the fixed PostgreSQL 18.6 tree, the bounded search found its macro in errcodes.txt but no core or contrib call that emits it. This is therefore a definition-only reference; a JSON conversion that merely looks similar is not evidence that the server used this SQLSTATE.
Meaning {#meaning}
The fixed catalogue gives this condition a SQL/JSON name, but the bounded 18.6 source scan did not find a PostgreSQL core or contrib emitter. It is not safe to turn the name into an invented JSONPath, constructor, scalar/array, or object conversion scenario. An extension or user-defined RAISE can have its own usage, but that is outside the fixed-tree result.
Diagnosis {#diagnosis}
Capture the exact SQLSTATE, primary/detail/hint, server log context, statement, and the extension or function that produced it. Use that evidence to identify the actual producer; do not classify a JSON syntax, ordinary type-input, or other conversion failure as 2203G from its wording alone.
Messages {#messages}
No fixed PostgreSQL 18.6 primary, detail, or hint template was resolved for this definition-only entry.
Response {#response}
There is no source-backed PostgreSQL-core repair recipe for this definition-only entry. After identifying the real producer, correct that producer's contract and retry the affected operation. If the producer did emit an ERROR in an explicit transaction, use ROLLBACK or ROLLBACK TO SAVEPOINT before retrying; in autocommit, correct the cause first and then submit the operation again. A connection reset is not implied by this condition definition.
Versions {#versions}
The locked catalogue records the condition from PostgreSQL 15.0. The fixed source boundary for this review is PostgreSQL 18.6 REL_18_6; the absence of a bounded-tree emitter does not establish when any concrete implementation path was introduced, nor how an extension or a future version behaves.
Related {#related}
Sources {#sources}
src/backend/utils/errcodes.txt#L231
The structured evidence record records the fixed definition and the bounded source-scan limit. It contains no runtime observation.
Compare versions
SQLSTATE evidence and recorded runtime versions
claims · identity
{
"claim_id": "identity",
"limits": "",
"method": "Read fixed definition.",
"position": 0,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "2203G is sql_json_item_cannot_be_cast_to_target_type in SQLSTATE Class 22."
}claims · scan-boundary
{
"claim_id": "scan-boundary",
"limits": "This is a bounded source result, not proof that an extension, user-defined RAISE, future code, or an unsearched generated path cannot emit 2203G.",
"method": "Search fixed src and contrib trees for the macro and condition name.",
"position": 1,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "The fixed PostgreSQL 18.6 source tree contains the macro definition in errcodes.txt but no core or contrib call using ERRCODE_SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE in the bounded scan."
}claims · history
{
"claim_id": "history",
"limits": "",
"method": "Use catalogue boundary.",
"position": 2,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "The locked catalogue records 2203G from 15.0; that boundary does not prove exact implementation introduction."
}sources · src.errcodes.18.6
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/utils/errcodes.txt",
"position": 0,
"sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
"source_id": "src.errcodes.18.6",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L231"
}Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · english-manuals:49c08c496865b82ca59329fca3119793a5421e682bccef5319bc5702a8e6b8a0
Text language: en · english-manuals:49c08c496865b82ca59329fca3119793a5421e682bccef5319bc5702a8e6b8a0