百科 / 错误代码 / Class HV 外部数据包装器错误
HV00P fdw_no_schemas
ERROR 源码确认 参考 未实测
- 条件名
fdw_no_schemas- 宏名称
ERRCODE_FDW_NO_SCHEMAS- 启用版本
- 9.1
- 状态
- 活跃
版本覆盖
速览
当选定的 FDW 没有 ImportForeignSchema 回调时,核心的 IMPORT FOREIGN SCHEMA 命令会产生 HV00P。它表示包装器不支持该导入机制,不表示远端模式为空。
含义与消息
当 fdw_routine->ImportForeignSchema 为空时,核心路径以 ERROR: foreign-data wrapper "%s" does not support IMPORT FOREIGN SCHEMA 报告。包装器名称是动态字段;此时未必已经查询远端模式。
诊断
确认 SERVER 子句中的 FDW,并检查其 handler 是否实现 ImportForeignSchema。将这种能力缺失与 HV00Q 区分开;后者是 postgres_fdw 支持导入却找不到请求的远端模式。
处理
使用显式的 CREATE FOREIGN TABLE 定义,改用实现了模式导入的包装器,或为包装器增加受支持的回调。对同一个 handler 重复执行相同的 IMPORT FOREIGN SCHEMA 只会得到同一能力错误。
消息与诊断
确认的严重级别为 ERROR,该调用组没有 detail 或 hint。保留 fdwname、服务器身份和 handler 扩展版本。
报文模板
源码里的格式串,不是某一次运行的输出。%s 之类是占位符,实际报文会填入对象名与取值。适用范围一栏是核验时留下的原始英文记录,未经翻译。
foreign-data wrapper "%s" does not support IMPORT FOREIGN SCHEMA
版本
锁定的 9.1.0 及后续快照中已有 HV00P 条件定义,但这不表示 IMPORT FOREIGN SCHEMA 在 9.1 已存在。固定的 PostgreSQL 9.5.0 源码快照已经包含该命令及其 ImportForeignSchema 回调;上面的 18.6 路径是本文确认的当前消息实现。没有可用的 9.1 之前定义观察资料。
来源
- 上游源码 src/backend/utils/errcodes.txt
- 上游源码 src/include/foreign/fdwapi.h 第 259–260 行
- 上游源码 src/backend/commands/foreigncmds.c
- 上游源码 src/backend/commands/foreigncmds.c 第 1509–1542 行
- 核验材料 raw/calls/REL_18_6.jsonl
证据
断言
每条断言都写明了是怎么核实的,以及它不覆盖什么。这一层是核验时留下的原始英文记录,照原样呈现,未经翻译。
-
HV00P is fdw_no_schemas in SQL/MED Class HV.
-
The core IMPORT FOREIGN SCHEMA command emits HV00P when the selected FDW handler has no ImportForeignSchema callback.
-
The IMPORT FOREIGN SCHEMA command and its ImportForeignSchema handler callback are present in the fixed PostgreSQL 9.5.0 source snapshot; the 9.1.0 directory observation for HV00P is a condition-definition boundary, not evidence that this command existed in 9.1.
同类错误代码
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_indexHV00Dfdw_invalid_option_nameHV00Jfdw_option_name_not_foundHV00Kfdw_reply_handleHV00Lfdw_unable_to_create_executionHV00Mfdw_unable_to_create_replyHV00Nfdw_unable_to_establish_connectionHV00Qfdw_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