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

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

百科 / 错误代码 / Class HV 外部数据包装器错误

HV00J fdw_option_name_not_found

ERROR 源码确认 参考 未实测

类别
Class HV 外部数据包装器错误
严重等级
ERROR
条件名
fdw_option_name_not_found
宏名称
ERRCODE_FDW_OPTION_NAME_NOT_FOUND
启用版本
9.1
状态
活跃

版本覆盖

速览

当 dblink 的连接选项不在接受的 dblink/libpq 选项集合中时,会使用 HV00J。dblink 是独立的 contrib 客户端 API,不是 FDW 回调实现;18.6 核心与 contrib 扫描没有解析出其他 HV00J 报告组。

含义与消息

在 dblink 的选项解析路径中,ERROR 的主消息为 invalid option "%s"。只有找到相近名称时才提示 Perhaps you meant the option "%s".;若存在合法选项但没有相近候选,源码不发送 hint;只有不存在任何合法选项时才提示 There are no valid options in this context.。固定的 REL9_6_24 dblink 快照显示较早的动态 Valid options in this context are: %s 提示;这只是有界比较,不代表精确的切换版本。

诊断

确认该选项属于 dblink 连接字符串或选项列表,并查看安装版本对应的 libpq 选项名称。保留确切选项名、dblink/libpq 版本,以及错误是否发生在解析连接定义时。不要把 postgres_fdw 的选项表用于 dblink。

处理

改用 dblink/libpq 支持的名称,或删除该选项,并保留相近名称提示作为线索。重新校验连接定义即可;无效选项名称是确定性的,不需要重试数据库事务。

诊断边界

确认的实现是 dblink 的选项解析器。本批没有运行自然环境实验,源码证据也不表示远端连接已经成功或失败。

报文模板

源码里的格式串,不是某一次运行的输出。%s 之类是占位符,实际报文会填入对象名与取值。适用范围一栏是核验时留下的原始英文记录,未经翻译。

HINT Perhaps you meant the option "%s".
HINT There are no valid options in this context.
主消息 · observed invalid option "%s"

来源:contrib/dblink/dblink.c @ REL_18_6

适用范围:When valid options exist but no close match is found, the source emits no hint; the no-valid-options hint is only used when no valid option exists.

HINT Valid options in this context are: %s
主消息 · observed invalid option "%s"

来源:contrib/dblink/dblink.c @ REL9_6_24

版本

该条件从 9.1.0 到 18.6 以及 19 Beta 3 均存在。固定的 18.6 与 REL9_6_24 dblink 快照显示了不同的提示措辞;它们界定已观察版本,但不确定切换版本。解读日志时应匹配实际安装版本。

来源

证据

断言

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

  • HV00J is fdw_option_name_not_found in SQL/MED Class HV.

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

    来源src/backend/utils/errcodes.txt

  • dblink uses HV00J in its own connection-option parser; dblink is a separate contrib client API rather than an FDW callback implementation.

    核实方式Read the fixed option-validation branch.

    来源contrib/dblink/dblink.c

  • The fixed REL9_6_24 dblink option parser uses the older dynamic hint 'Valid options in this context are: %s' with the same invalid-option ERROR; this is a bounded snapshot comparison, not an exact transition release.

    核实方式Read the fixed REL9_6_24 dblink.c error branch at lines 2017-2021.

    不覆盖This fixed snapshot establishes dblink's wording there; it does not date the transition or generalize to other clients.

    来源contrib/dblink/dblink.c

同类错误代码

Class HV 外部数据包装器错误 下的其他成员。