2203G — sql_json_item_cannot_be_cast_to_target_type
SQL/JSON 项无法转换为目标类型。
英文手册覆盖始于 PostgreSQL 8.1. 来源历史与运行验证各自保留独立版本边界。
当前阅读 PG 18·选择有来源记录的版本
- aliases
- 未知
- class name
- Data Exception
- condition name
- sql_json_item_cannot_be_cast_to_target_type
- lang
- en
- sqlstate
- 2203G
版本定义 PG 18
2203G
速览 {#at-a-glance}
2203G 是目录条件 sql_json_item_cannot_be_cast_to_target_type。在固定的 PostgreSQL 18.6 树中,有界搜索只在 errcodes.txt 找到宏定义,没有找到核心代码或 contrib 中实际发出该条件的调用。因此这是一页仅有定义边界的参考;看起来相似的 JSON 转换不能证明服务器使用了这个 SQLSTATE。
含义 {#meaning}
固定目录给出了 SQL/JSON 条件名,但 18.6 有界源码扫描没有找到 PostgreSQL 核心代码或 contrib 的发出路径。不能把这个名字扩展成未经证实的 JSONPath、构造器、标量/数组或对象转换场景。扩展或用户自定义 RAISE 可以自行使用该状态码,但那不属于固定源码树的结果。
诊断 {#diagnosis}
保留完整 SQLSTATE、主消息/详细信息/提示、服务器日志上下文、语句,以及产生它的扩展或函数。用这些证据识别真正的发出者,不要只因文字像 JSON、普通类型输入或其他转换失败就归类为 2203G。
报文 {#messages}
本次没有为这个仅有定义的条目解析出固定 PostgreSQL 18.6 主消息、详细信息或提示模板。
处理 {#response}
这个仅定义条目没有 PostgreSQL 核心代码提供的、有源码依据的处置方法。先确认实际发出者,再修正该发出者的契约并重试受影响的操作。如果实际发出的是 ERROR 且处于显式事务中,先执行 ROLLBACK 或 ROLLBACK TO SAVEPOINT;自动提交模式下先修正原因,再重新提交操作。这个条件定义本身不要求重置连接。
版本 {#versions}
锁定目录从 PostgreSQL 15.0 记录此条件。本次固定源码边界是 PostgreSQL 18.6 REL_18_6;固定源码树中未找到发出者,不能据此确定任何具体实现路径何时引入或其行为,也不能推断扩展或未来版本的行为。
相关 {#related}
来源 {#sources}
src/backend/utils/errcodes.txt#L231
结构化证据记录保存固定定义和有界源码扫描的限制;本页没有运行观察。
比较版本
SQLSTATE 证据与已记录的运行版本
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"
}来源引用
定义来源
center · PostgreSQL 18 · english-manuals:49c08c496865b82ca59329fca3119793a5421e682bccef5319bc5702a8e6b8a0
正文语言: zh-Hans · english-manuals:49c08c496865b82ca59329fca3119793a5421e682bccef5319bc5702a8e6b8a0