2F002 — modifying_sql_data_not_permitted
例程的数据访问契约不允许修改 SQL 数据。
英文手册覆盖始于 PostgreSQL 8.1. 来源历史与运行验证各自保留独立版本边界。
当前阅读 PG 18·选择有来源记录的版本
- aliases
- 未知
- class name
- SQL Routine Exception
- condition name
- modifying_sql_data_not_permitted
- lang
- en
- sqlstate
- 2F002
版本定义 PG 18
2F002
速览 {#at-a-glance}
SQLSTATE 2F002 是 SQL Routine Exception 中表示例程声明的数据访问契约不允许修改 SQL 数据的标准成员。锁定的 PostgreSQL 18.6 定义包含该成员,但已解析的 core/contrib 调用扫描没有找到原生报告调用组。不能据此推断 PostgreSQL 的 VOLATILE、STABLE 或 IMMUTABLE 单独会映射到此 SQLSTATE。
含义 {#meaning}
该条件描述某个实现执行例程数据访问契约时的限制。PostgreSQL 目录行只提供身份和宏,并未证明后端存在执行该限制的路径,也未指定某种例程语言。扩展、嵌入式 SQL 实现、驱动或远端服务器可能独立使用这个标准成员。
消息 {#messages}
由于有界扫描没有解析出原生报告调用,本页不采用未经确认的 PostgreSQL 固定消息变体。
诊断 {#diagnosis}
先保留实际 SQLSTATE,并检查例程声明以及执行限制的所有者。确认尝试的语句是否修改数据、例程是否声明了限制性的数据访问特征,以及代码来自远端还是客户端实现。如果服务器返回其他代码,应按那个代码处理,不要把 2F002 当成 PostgreSQL 函数 volatility 错误的同义词。
处理 {#response}
只有在实际产生者文档明确支持时,才修改例程的数据访问声明,或把修改数据的工作移到允许的例程边界。否则应修正调用方或远端契约。不要加入通用重试:数据修改被拒绝本身不能说明周围工作是否已提交。
版本 {#versions}
锁定目录将该条件的已知下界记为 PostgreSQL 7.4。事实块列出已发布快照;源码路径状态仅限于下方固定的 PostgreSQL 18.6 资料。
相关 {#related}
来源 {#sources}
固定的errcodes 定义确认成员和宏;SQLSTATE 附录标识标准条件。锁定的 core/contrib 扫描未找到已解析的原生 2F002 报告调用组。 详见结构化证据记录,其中记录固定源码路径、扫描范围和未解决的运行边界。
比较版本
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": "2F002 is modifying_sql_data_not_permitted in SQLSTATE Class 2F."
}claims · scan-boundary
{
"claim_id": "scan-boundary",
"limits": "The scan does not cover external wrappers, drivers, extensions, remote systems, or user code; absence from this scan is not an absolute absence claim.",
"method": "Compare resolved report groups with the fixed macro mapping.",
"position": 1,
"runtime": [],
"sources": [
"src.calls.REL_18_6",
"src.errcodes.18.6"
],
"statement": "No resolved 2F002 report group was found in the locked PostgreSQL 18.6 core/contrib call scan."
}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 7.4 boundary; they do not establish a precise introducing release or runtime use."
}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#L290"
}sources · src.calls.REL_18_6
{
"commit": "",
"docs_url": "",
"kind": "local_artifact",
"location": "",
"path": "raw/calls/REL_18_6.jsonl",
"position": 1,
"sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf",
"source_id": "src.calls.REL_18_6",
"tag": "",
"url": ""
}来源引用
定义来源
center · PostgreSQL 18 · english-manuals:e1209c57188d9dae08008e127f8a3015acb7fe7b832e107e3a8689eae6620a1b
正文语言: zh-Hans · english-manuals:e1209c57188d9dae08008e127f8a3015acb7fe7b832e107e3a8689eae6620a1b