2203G
Read PG 18 manual ↗sql_json_item_cannot_be_cast_to_target_type
- SQLSTATE
- 2203G
- Condition name
- sql_json_item_cannot_be_cast_to_target_type
- Class
- Data Exception
- Source macro
- ERRCODE_SQL_JSON_ITEM_CANNOT_BE_CAST_TO_TARGET_TYPE
- Evidence
- Source path confirmed
English SQLSTATE atlas: authored explanations and source/runtime evidence are separate from the manual definitions. View source ↗
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
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
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
No fixed PostgreSQL 18.6 primary, detail, or hint template was resolved for this definition-only entry.
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
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.
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.
Source evidence
Evidence belongs to the frozen source and runtime versions listed here. It is not a runtime verification of the selected manual version.
2203G is sql_json_item_cannot_be_cast_to_target_type in SQLSTATE Class 22.
Method: Read fixed definition.
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.
Method: Search fixed src and contrib trees for the macro and condition name.
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.
The locked catalogue records 2203G from 15.0; that boundary does not prove exact implementation introduction.
Method: Use catalogue boundary.
- src/backend/utils/errcodes.txt · REL_18_6 ·
724edf9bde9d356724ad384a2e196edc3c9f80f7
Message templates
No extracted message template is attached to this condition.
Reproduction & repair cases
No reproduction case is attached to this condition.
Recorded runtime evidence
No runtime observation is attached to this entry.
Version history 1
- PG 14 → 15added
Definition snapshot: english-manuals:c60fef86698e2198a568f9ee7f0… · English manual source