选择 打开 改范围 完整检索页

pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。

百科 / 错误代码 / Class 3B 保存点异常

3B000 savepoint_exception

保存点异常

ERROR 仅定义 参考 未实测

类别
Class 3B 保存点异常
严重等级
ERROR
条件名
savepoint_exception
宏名称
ERRCODE_SAVEPOINT_EXCEPTION
启用版本
8.0
状态
活跃

版本覆盖

速览

3B000 是保存点异常类别的定义。固定核心调用扫描解析到的是更具体的缺失保存点路径 3B001,没有独立的通用 3B000 抛出点。诊断保存点失败时应使用服务器实际给出的具体 SQLSTATE;本页不编造类别级 RAISE 案例。

含义

3B000 是 3B 类的保存点异常条件。固定扫描解析到具体的缺失保存点码 3B001,没有独立的通用类码核心抛出点。因此服务器给出具体码时,应按 3B001 诊断找不到的保存点名称。

诊断

保存请求的保存点名称、是否存在显式事务,以及标记是否已释放或属于另一层嵌套。先读取服务器给出的具体 SQLSTATE:没有事务块时 ROLLBACK TO SAVEPOINT25P01;显式块中缺少标记,在选定源码中由 3B001 表示。本页没有独立的自然运行案例。

处理

按具体错误选择边界:先开启事务再创建保存点;显式事务失败后先回滚,再建立新标记。不要伪造 3B000 的重试或使用 CASCADE;本页保持定义边界,缺失名称请看有源码依据的 3B001 路径。

可复现案例

在一次性实例上执行过的场景。

savepoint_exception_boundary PG 10 / 18

前置条件

  • A runner-owned disposable target is provisioned.

触发

No generic 3B000 trigger is executed; the specific invalid-savepoint path is covered by 3B001.

处置

Use the specific savepoint condition and transaction boundary supplied by the server; do not manufacture a class-level RAISE.

清理

Drop the case schema with an owner connection.

版本

上面的锁定事实表记录项目快照范围内的目录存在情况。固定源码证据只覆盖下面声明的路径;不能仅从定义推导精确行为引入版本或更广的运行覆盖。

来源

证据

断言

每条断言都写明了是怎么核实的,以及它不覆盖什么。这一层是核验时留下的原始英文记录,照原样呈现,未经翻译。

  • 3B000 is the savepoint_exception condition in Class 3B.

    核实方式Read the fixed errcodes.txt row and macro mapping.

    不覆盖This records the protocol definition and does not imply a natural PostgreSQL throw path.

    来源src/backend/utils/errcodes.txt

  • No distinct safe natural core runtime case for 3B000 was selected from the fixed call scan.

    核实方式Review the fixed call scan for resolved 3B000 call groups and reject artificial RAISE or relabeling.

    不覆盖This is a bounded source/definition result, not proof that every extension or injected fault cannot emit the code.

    来源raw/calls/REL_18_6.jsonl

同类错误代码

Class 3B 保存点异常 下的其他成员。