22018 — invalid_character_value_for_cast
字符值无法通过所要求的类型转换。
英文手册覆盖始于 PostgreSQL 8.1. 来源历史与运行验证各自保留独立版本边界。
当前阅读 PG 18·选择有来源记录的版本
- aliases
- 未知
- class name
- Data Exception
- condition name
- invalid_character_value_for_cast
- lang
- en
- sqlstate
- 22018
版本定义 PG 18
速览 {#at-a-glance}
字符值被操作所要求的转换拒绝。固定的 PostgreSQL 18.6 目录已确认 invalid_character_value_for_cast,但有限源码扫描没有把本码绑定到单一原生发出函数或报文模板。
含义 {#meaning}
22018表示字符表示形式不能被请求的转换接受。条件名不能决定目标类型、解析器、区域规则或包装器;这些细节属于实际报出本码的操作。不要把目录定义扩写成某一个具体转换实现的结论。
诊断 {#diagnosis}
阅读完整 primary、源类型和目标类型、输入格式以及相关区域或类型设置,判断是目标解析器不接受格式、值超出范围,还是类型解析拒绝。日期时间语法诊断、数值范围诊断和一般运算符不匹配可能使用相邻错误码;应由实际报文和归属实现决定修复方式。
处理 {#response}
按实际源类型、目标类型和格式规则修正源表示或显式转换。如果报文来自包装器或扩展,应遵循该消费者的解析规则,不要假设固定核心扫描已经覆盖。
版本 {#versions}
锁定目录从 7.4 起记录该条件;固定源码覆盖 PostgreSQL 18.6。本次有限审阅没有确定精确的实现引入时间或固定原生发出路径。
相关 {#related}
来源 {#sources}
固定定义已在 errcodes.txt 中核对。运行核验为 not_run;有限的 PostgreSQL 18.6 扫描没有解析出单一原生发出路径,因此本页不宣称具体 primary 模板、严重级别或事务影响。结构化证据记录保留定义和范围边界。
比较版本
SQLSTATE 证据与已记录的运行版本
claims · identity
{
"claim_id": "identity",
"limits": "",
"method": "Read the fixed errcodes row and macro.",
"position": 0,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "22018 is invalid_character_value_for_cast in SQLSTATE Class 22."
}claims · bounded-source-scope
{
"claim_id": "bounded-source-scope",
"limits": "A particular parser or wrapper must supply the complete diagnostic context.",
"method": "Keep the catalogue definition separate from an unresolved emitter search.",
"position": 1,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "The bounded PostgreSQL 18.6 source review does not bind 22018 to one native emitter, parser, primary template, or severity."
}claims · history
{
"claim_id": "history",
"limits": "",
"method": "Use catalogue presence and history boundaries.",
"position": 2,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "The locked catalogue records 22018 from 7.4 without proving an exact implementation introduction date."
}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#L188"
}来源引用
定义来源
center · PostgreSQL 18 · english-manuals:08bd01c900f6c5d9df5362ec043f96bb09392d99e59823f0ebe2fa42c2499eb8
正文语言: zh-Hans · english-manuals:08bd01c900f6c5d9df5362ec043f96bb09392d99e59823f0ebe2fa42c2499eb8