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

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

百科 / 错误代码 / Class 25 事务状态无效

25007 schema_and_data_statement_mixing_not_supported

不支持混合模式与数据语句

ERROR 仅定义 参考 不适用

类别
Class 25 事务状态无效
严重等级
ERROR
条件名
schema_and_data_statement_mixing_not_supported
宏名称
ERRCODE_SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED
启用版本
7.4
状态
活跃

版本覆盖

速览

25007 表示混合模式语句与数据语句的事务状态条件。固定 PostgreSQL 18.6 核心扫描没有解析出直接报错组,因此本文不制造 SQL 示例。

含义

该条件名描述狭窄的语句组合边界,不能泛化为语法错误、只读事务错误或活动事务错误。

诊断

应同时保留协议或 API 操作、语句序列和服务器精确 SQLSTATE。固定核心证据没有可引用的报文模板,也没有确认安全的自然案例。

处理

按 API 文档的语句分组要求执行,必要时把模式变更与数据操作拆开。不要仅凭条件名发明重试或 RAISE 路径。

可复现案例

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

schema_data_statement_boundary PG 10 / 18

前置条件

  • A runner-owned disposable target is provisioned.

触发

Source/definition evidence only; no natural SQL trigger is claimed.

断言

  • No fabricated SQL trigger is included; the selected run records a definition/source boundary.

处置

Follow the explicit transaction or source boundary described by the case.

清理

Drop the case schema with an owner connection.

源码报文与运行边界

固定 errcodes.txt 定义了该条件和宏;raw/calls/REL_18_6.jsonl 的解析调用扫描没有直接报错组,因此本批不发布报文模板,也不构造自然 SQL 触发器。

适用边界与案例

本批运行器在 PostgreSQL 18.6 与 10.21 的选定 case 均为 not_applicable,只记录源码边界,没有可复制的 SQL 触发过程。结构化证据 · 案例导出

版本与边界

生成事实记录锁定目录成员。两个 runner 目标的 case 都是 not_applicable 源码边界,不声称有自然运行覆盖。

来源

证据

断言

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

  • 25007 is schema_and_data_statement_mixing_not_supported in Class 25.

    核实方式Read the fixed condition row and macro.

    不覆盖The name points to a statement-composition boundary, not a generic DDL error.

    来源src/backend/utils/errcodes.txt

  • The exhaustive resolved PostgreSQL 18.6 call scan contains no direct 25007 report group; no natural SQL reproduction or message template is published here.

    核实方式Scan fixed source call records for SQLSTATE 25007.

    不覆盖This batch does not turn SQL/MED or protocol-only assumptions into a backend case.

    来源raw/calls/REL_18_6.jsonl

运行记录

目标服务器版本结果覆盖案例
latest 18.6 (Homebrew) not_applicable schema_data_statement_boundary
pg10 10.21 (Debian 10.21-1.pgdg90+1) not_applicable schema_data_statement_boundary

同类错误代码

Class 25 事务状态无效 下的其他成员。