百科 / 错误代码 / Class HV 外部数据包装器错误
HV00D fdw_invalid_option_name
ERROR 源码确认 参考 未实测
- 条件名
fdw_invalid_option_name- 宏名称
ERRCODE_FDW_INVALID_OPTION_NAME- 启用版本
- 9.1
- 状态
- 活跃
版本覆盖
速览
当 FDW 选项名称不符合当前包装器上下文时,会产生 HV00D。PostgreSQL 18.6 在 file_fdw、postgres_fdw 以及 postgres_fdw 的导入选项解析器中都有直接路径。
含义与消息
包装器会按当前上下文检查选项:可能是 FDW、服务器、外部表、用户映射或导入。18.6 的主消息模板是 invalid option "%s"。file_fdw 与 postgres_fdw/option.c 只有在找到足够相近名称时才提示 Perhaps you meant the option "%s".;若存在合法选项但没有相近候选,源码不发送 hint;只有不存在任何合法选项时才提示 There are no valid options in this context.。postgres_fdw 导入解析器只有主消息。
诊断
记录正在修改的对象和包装器版本,然后查看该包装器的验证逻辑与选项表。确认选项属于服务器、外部表还是用户映射;同名选项可能只在其中一个范围有效。保留消息中的相近名称,不要套用其他包装器的选项表。
处理
使用已安装包装器在该范围支持的名称,或删除不支持的选项。若选项来自较新的扩展,先确认版本差异确实是原因,再协调扩展与服务器版本。重复相同定义不会改变验证结果。
消息与诊断
18.6 的确认路径位于 file_fdw、postgres_fdw 选项验证器和 postgres_fdw 导入选项解析器,严重级别均为 ERROR。%s 代表动态选项名称或相近名称;提示会随匹配结果变化。
报文模板
源码里的格式串,不是某一次运行的输出。%s 之类是占位符,实际报文会填入对象名与取值。适用范围一栏是核验时留下的原始英文记录,未经翻译。
Perhaps you meant the option "%s".
There are no valid options in this context.
invalid option "%s"
来源:contrib/file_fdw/file_fdw.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.
Perhaps you meant the option "%s".
There are no valid options in this context.
invalid option "%s"
来源:contrib/postgres_fdw/option.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.
invalid option "%s"
来源:contrib/postgres_fdw/postgres_fdw.c @ REL_18_6
适用范围:This import-option parser has only the primary message in the fixed 18.6 path; it does not use the validator close-match or no-valid-options hint branches.
Valid options in this context are: %s
invalid option "%s"
Valid options in this context are: %s
invalid option "%s"
版本
HV00D 从 9.1.0 到 18.6 以及 19 Beta 3 均存在。固定的 REL9_6_24 file_fdw 与 postgres_fdw 验证器快照使用较早的 Valid options in this context are: %s 提示,而固定的 18.6 路径使用相近名称或无可用选项的提示。这两个快照只界定措辞范围,不能确定具体切换版本;比较日志时应以实际安装版本为准。
来源
- 上游源码 src/backend/utils/errcodes.txt
- 上游源码 contrib/file_fdw/file_fdw.c
- 上游源码 contrib/file_fdw/file_fdw.c 第 240–246 行
- 上游源码 contrib/postgres_fdw/postgres_fdw.c
- 上游源码 contrib/postgres_fdw/option.c
- 上游源码 contrib/postgres_fdw/option.c 第 99–103 行
- 核验材料 raw/calls/REL_18_6.jsonl
证据
断言
每条断言都写明了是怎么核实的,以及它不覆盖什么。这一层是核验时留下的原始英文记录,照原样呈现,未经翻译。
-
HV00D is fdw_invalid_option_name in SQL/MED Class HV.
-
file_fdw and postgres_fdw validate option names in their object-specific contexts; the postgres_fdw import parser uses the same condition for an invalid import option.
-
Fixed REL9_6_24 snapshots of file_fdw and postgres_fdw/option.c use 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.
同类错误代码
Class HV 外部数据包装器错误 下的其他成员。
HV000fdw_errorHV001fdw_out_of_memoryHV002fdw_dynamic_parameter_value_neededHV004fdw_invalid_data_typeHV005fdw_column_name_not_foundHV006fdw_invalid_data_type_descriptorsHV007fdw_invalid_column_nameHV008fdw_invalid_column_numberHV009fdw_invalid_use_of_null_pointerHV00Afdw_invalid_string_formatHV00Bfdw_invalid_handleHV00Cfdw_invalid_option_indexHV00Jfdw_option_name_not_foundHV00Kfdw_reply_handleHV00Lfdw_unable_to_create_executionHV00Mfdw_unable_to_create_replyHV00Nfdw_unable_to_establish_connectionHV00Pfdw_no_schemasHV00Qfdw_schema_not_foundHV00Rfdw_table_not_foundHV010fdw_function_sequence_errorHV014fdw_too_many_handlesHV021fdw_inconsistent_descriptor_informationHV024fdw_invalid_attribute_valueHV090fdw_invalid_string_length_or_buffer_lengthHV091fdw_invalid_descriptor_field_identifier