10608 — invalid_argument_for_xquery
XQuery/XPath 表达式参数无效,如路径为空。
英文手册覆盖始于 PostgreSQL 8.1. 来源历史与运行验证各自保留独立版本边界。
当前阅读 PG 18·选择有来源记录的版本
- aliases
- 未知
- class name
- XQuery Error
- condition name
- invalid_argument_for_xquery
- lang
- en
- sqlstate
- 10608
版本定义 PG 18
10608
速览 {#at-a-glance}
SQLSTATE 10608 是 XQuery 类别中表示参数无效的 ERROR 条件。PostgreSQL 18.6 已确认后端 XML 路径会因 XPath 表达式为空、行路径过滤器为空或列路径过滤器为空而报告它。contrib/xml2 源码也引用该宏,但引用本身不能证明存在另一条报告消息。
含义 {#meaning}
固定后端调用在 src/backend/utils/adt/xml.c 中分别报告 empty XPath expression、row path filter must not be empty string 和 column path filter must not be empty string。这些是 XML/XPath 处理中的参数校验失败。核心报告并不意味着所有 XPath/XSLT 或扩展参数错误都使用 10608。
消息 {#messages}
固定消息是 empty XPath expression、row path filter must not be empty string 和 column path filter must not be empty string。
诊断 {#diagnosis}
确认哪个 XML 操作提供了参数,并判断为空的是 XPath 表达式、行路径过滤器还是列路径过滤器。保留准确消息和输入形状;对于 xml2 或其他扩展,应单独检查扩展调用路径,因为宏引用不是报告调用组。比较行为时记录服务器版本:锁定目录将 10608 的已知下界置于 PostgreSQL 18.0。
处理 {#response}
按照 XML 函数要求提供非空表达式或过滤器,先验证修正后的输入,再重复语句。若操作由扩展负责,应遵循扩展的参数规则。这是输入修复;不改变空参数而重试无法解决已确认的路径。
版本 {#versions}
锁定目录将该条件的已知下界记为 PostgreSQL 18.0。事实块列出已发布快照;源码路径状态仅限于下方固定的 PostgreSQL 18.6 资料。
相关 {#related}
来源 {#sources}
固定后端 xml.c报告空 XPath 变体,行/列过滤器检查报告其他变体。contrib/xml2/xpath.c 和 xslt_proc.c包含宏引用。参见 XML 函数文档。 详见结构化证据记录,其中记录固定源码路径、扫描范围和未解决的运行边界。
比较版本
SQLSTATE 证据与已记录的运行版本
claims · identity
{
"claim_id": "identity",
"limits": "",
"method": "Read the fixed errcodes definition row, severity, and macro.",
"position": 0,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "10608 is invalid_argument_for_xquery in SQLSTATE Class 10."
}claims · resolved-path
{
"claim_id": "resolved-path",
"limits": "This is source confirmation, not a runtime observation in this batch.",
"method": "Read the complete source context around the resolved report group.",
"position": 1,
"runtime": [],
"sources": [
"src.xml.18.6",
"src.xml2.xpath.18.6",
"src.xml2.xslt.18.6"
],
"statement": "The fixed PostgreSQL 18.6 source contains the report path and message context described on the page."
}claims · history-boundary
{
"claim_id": "history-boundary",
"limits": "Definition presence is not an emitting-path observation.",
"method": "Compare canonical release-definition facts with the available history boundary.",
"position": 2,
"runtime": [],
"sources": [
"src.errcodes.18.6"
],
"statement": "The locked release definitions establish catalogue presence from the known 18.0 boundary; they do not establish a precise introducing release or runtime use."
}messages · message.xml-empty-xpath
{
"limits": "",
"message_id": "message.xml-empty-xpath",
"path": "",
"position": 0,
"raw": {
"id": "message.xml-empty-xpath",
"primary_template": "empty XPath expression",
"severity_source": "ERROR",
"sources": [
"src.xml.18.6"
],
"sqlstate": "10608"
},
"severity": "ERROR",
"sources": [
"src.xml.18.6"
],
"templates": [
{
"kind": "primary",
"literal": "empty XPath expression",
"position": 0,
"role": "",
"template": "empty XPath expression"
}
]
}messages · message.xml-empty-row-path
{
"limits": "",
"message_id": "message.xml-empty-row-path",
"path": "",
"position": 1,
"raw": {
"id": "message.xml-empty-row-path",
"primary_template": "row path filter must not be empty string",
"severity_source": "ERROR",
"sources": [
"src.xml.18.6"
],
"sqlstate": "10608"
},
"severity": "ERROR",
"sources": [
"src.xml.18.6"
],
"templates": [
{
"kind": "primary",
"literal": "row path filter must not be empty string",
"position": 0,
"role": "",
"template": "row path filter must not be empty string"
}
]
}messages · message.xml-empty-column-path
{
"limits": "",
"message_id": "message.xml-empty-column-path",
"path": "",
"position": 2,
"raw": {
"id": "message.xml-empty-column-path",
"primary_template": "column path filter must not be empty string",
"severity_source": "ERROR",
"sources": [
"src.xml.18.6"
],
"sqlstate": "10608"
},
"severity": "ERROR",
"sources": [
"src.xml.18.6"
],
"templates": [
{
"kind": "primary",
"literal": "column path filter must not be empty string",
"position": 0,
"role": "",
"template": "column path filter must not be empty string"
}
]
}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#L148"
}sources · src.xml.18.6
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "src/backend/utils/adt/xml.c",
"position": 1,
"sha256": "f1c70b5ee5ee9a20a41d9b2c27bc7a8a50dbd9489ba462a4a678f7f55f14d",
"source_id": "src.xml.18.6",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/adt/xml.c"
}sources · src.xml2.xpath.18.6
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "contrib/xml2/xpath.c",
"position": 2,
"sha256": "2eb71a90f3cf2f3d0f4137327600f410dcade58ce1dbde93ea0cf90d81430792",
"source_id": "src.xml2.xpath.18.6",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/xml2/xpath.c"
}sources · src.xml2.xslt.18.6
{
"commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
"docs_url": "",
"kind": "upstream_source",
"location": "",
"path": "contrib/xml2/xslt_proc.c",
"position": 3,
"sha256": "a5a76f59e851175955dfa62477fd4a7d7be3fb69b37e7a7e955ab76c8e01d0ae",
"source_id": "src.xml2.xslt.18.6",
"tag": "REL_18_6",
"url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/xml2/xslt_proc.c"
}sources · src.calls.REL_18_6
{
"commit": "",
"docs_url": "",
"kind": "local_artifact",
"location": "",
"path": "raw/calls/REL_18_6.jsonl",
"position": 4,
"sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf",
"source_id": "src.calls.REL_18_6",
"tag": "",
"url": ""
}来源引用
定义来源
center · PostgreSQL 18 · english-manuals:a19d1d76bbe5ce7a766222392732be79376f1b66de64aa17fbbf62821d367cf2
正文语言: zh-Hans · english-manuals:a19d1d76bbe5ce7a766222392732be79376f1b66de64aa17fbbf62821d367cf2