百科 / 错误代码 / Class 0L 无效授权者
0L000 invalid_grantor
授权者无效
ERROR 源码确认 参考 未实测
- 条件名
invalid_grantor- 宏名称
ERRCODE_INVALID_GRANTOR- 启用版本
- 7.4
- 状态
- 活跃
版本覆盖
速览
SQLSTATE 0L000 是 Class 0L 中的 invalid_grantor。固定的 aclparse 路径把它用于旧 ACL item 文本省略 /grantor 后缀时的向后兼容警告,并将授权者回退为 BOOTSTRAP_SUPERUSERID。这是 ACL 文本解析路径,不是 bootstrap 或 ACL 初始化阶段,也不是普通“权限不足”或无效 GRANT 操作路径。
含义
0L000 是 invalid_grantor。在 aclparse 中,ACL item 没有 /grantor 后缀时会走向后兼容回退:解析器把授权者设为 BOOTSTRAP_SUPERUSERID,并发出带 SQLSTATE 0L000 的 WARNING。它可以发生在普通 ACL 文本解析过程中,并不表示 bootstrap 初始化。若有斜线却没有后续名称,同一解析器会改为以 22P02 和 a name must follow the "/" sign 报错。
诊断
出现此警告时,检查正在解析的 ACL 文本以及是否含有授权者后缀。缺少斜线与斜线后为空是不同输入:前者走 0L000 兼容警告,后者走 22P02。普通 GRANT 应根据具体对象或权限报错诊断,例如 0LP01 或 42501。
处理
如果文本由本方控制,应补写有效授权者并复核最终 ACL。不要把该警告当成 bootstrap 初始化失败的证据。本页只记录源码路径,没有选择自然 SQL 的 0L000 触发案例。
可复现案例
在一次性实例上执行过的场景。
source_boundary PG 10 / 18
前置条件
- A runner-owned disposable target is provisioned only if a source-boundary smoke run is requested.
触发
No artificial SQL trigger is executed; this record preserves the fixed source/definition boundary.
处置
Use the concrete source path or component-specific documentation when it applies.
清理
Drop the case schema with an owner connection.
报文
固定的省略授权者分支以 WARNING 和 0L000 发出主报文 defaulting grantor to user ID %u,用户 ID 是动态值。相邻的斜线后无名称分支以 ERROR 和 22P02 发出主报文 a name must follow the "/" sign。只有客户端异常而没有服务器诊断时,不能据此认定 0L000。
报文模板
源码里的格式串,不是某一次运行的输出。%s 之类是占位符,实际报文会填入对象名与取值。适用范围一栏是核验时留下的原始英文记录,未经翻译。
defaulting grantor to user ID %u
来源:src/backend/utils/adt/acl.c @ REL_18_6 · src/backend/utils/adt/acl.c @ REL_10_23
适用范围:The %u value is BOOTSTRAP_SUPERUSERID in the fixed fallback branch; this message is emitted for ACL text without a /grantor suffix.
a name must follow the "/" sign
代表案例
本页没有选定的自然 SQL 运行。结构化证据记录的是源码或定义边界;客户端 RAISE 不能代表服务器机制。
版本
上面的生成事实表记录锁定的目录快照和最早观察到的定义。本页没有选定的自然 SQL 运行;固定 REL_18_6/REL_10_23 的 aclparse 源码比较不能当作实测结果,也不能据此推断所有中间版本的行为。
来源
- 上游源码 src/backend/utils/adt/acl.c 第 350–353 行
- 上游源码 src/backend/utils/adt/acl.c 第 408–411 行
- 上游源码 src/backend/utils/adt/acl.c 第 338–344 行
- 上游源码 src/backend/utils/errcodes.txt
- 核验材料 verify/cases/0L000/cases.json
- 核验材料 raw/calls/REL_10_23.jsonl
- 核验材料 raw/calls/REL_18_6.jsonl
证据
断言
每条断言都写明了是怎么核实的,以及它不覆盖什么。这一层是核验时留下的原始英文记录,照原样呈现,未经翻译。
-
0L000 is the invalid_grantor condition in Class 0L.
-
The fixed aclparse path accepts ACL item text without a /grantor suffix for backward compatibility, defaults the grantor to BOOTSTRAP_SUPERUSERID, and emits WARNING 0L000. If a slash is present but no name follows it, the parser instead emits 22P02; this is ACL text parsing rather than bootstrap or ACL initialization and is not an ordinary GRANT failure.
-
The locked catalogue records 0L000 in the listed snapshots; this page compares only the fixed REL_18_6 and REL_10_23 aclparse source paths and has no selected natural runtime.
同类错误代码
Class 0L 无效授权者 下的其他成员。