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

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

百科 / 错误代码 / Class 39 外部例程调用异常

39004 null_value_not_allowed

ERROR 仅定义 参考 未实测

类别
Class 39 外部例程调用异常
严重等级
ERROR
条件名
null_value_not_allowed
宏名称
ERRCODE_E_R_I_E_NULL_VALUE_NOT_ALLOWED
启用版本
7.4
状态
活跃

版本覆盖

速览

39004 是 SQL Routine Exception 类中的 null_value_not_allowed。本页只根据固定定义和有界源码扫描说明定位方法,不把条件名扩展成未经证实的具体调用。

含义

它表示某个 routine、扩展或其调用边界拒绝了不允许的 NULL。固定 PostgreSQL 18.6 调用归档没有解析出该条件的报告路径,因此不能仅凭 SQLSTATE 判断是参数、返回值、触发器还是其他 routine 约束。

诊断

先保存完整 ErrorResponse 的 message、detail、hint、schema、table、column、routine 与位置字段,再按实际 routine 或扩展实现搜索 ERRCODE_E_R_I_E_NULL_VALUE_NOT_ALLOWED。若代码来自客户端封装或扩展,要检查它实际选择的 SQLSTATE;本页的有界扫描不能替代对部署版本的 wrapper 源码检查。

处置

修正诊断中指明的 NULL 输入或 routine 契约,并重新核对调用方与实现方的边界。没有具体报告该码的路径时,不要凭条件名改事务策略、盲目重试或声称某个 SQL 语句必然触发它。

版本

锁定目录从 7.4 记录该条件,并在列出的正式快照及 19beta3 中出现;这只是定义存在边界,未确认精确引入实现。

来源

证据

断言

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

  • 39004 is null_value_not_allowed, a SQL Routine Exception condition defined in Class 39.

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

    来源src/backend/utils/errcodes.txt

  • The fixed REL_18_6 call archive contains no resolved report group for 39004.

    核实方式Filter the archive by code and inspect concrete report groups.

    不覆盖This is a bounded archive result, not proof that no extension, wrapper, or older/newer source can emit it.

    来源raw/calls/REL_18_6.jsonl

  • The locked catalogue records the condition from 7.4 and in the listed release snapshots, without identifying an introducing implementation.

    核实方式Use catalogue presence and history boundaries.

    不覆盖Definition presence does not identify the operation that rejected the NULL.

    来源src/backend/utils/errcodes.txt

同类错误代码

Class 39 外部例程调用异常 下的其他成员。