↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

Wiki / SQLSTATE

HV00P — fdw_no_schemas

包装器不支持 IMPORT FOREIGN SCHEMA 导入。

英文手册覆盖始于 PostgreSQL 8.1. 来源历史与运行验证各自保留独立版本边界。

当前阅读 PG 18·选择有来源记录的版本

aliases
未知
class name
Foreign Data Wrapper Error (SQL/MED)
condition name
fdw_no_schemas
lang
en
sqlstate
HV00P

版本定义 PG 18

HV00P — fdw_no_schemas

速览 {#at-a-glance}

当选定的 FDW 没有 ImportForeignSchema 回调时,核心的 IMPORT FOREIGN SCHEMA 命令会产生 HV00P。它表示包装器不支持该导入机制,不表示远端模式为空。

含义与消息 {#meaning}

当 fdw_routine->ImportForeignSchema 为空时,核心路径以 ERROR: foreign-data wrapper "%s" does not support IMPORT FOREIGN SCHEMA 报告。包装器名称是动态字段;此时未必已经查询远端模式。

诊断 {#diagnosis}

确认 SERVER 子句中的 FDW,并检查其 handler 是否实现 ImportForeignSchema。将这种能力缺失与 HV00Q 区分开;后者是 postgres_fdw 支持导入却找不到请求的远端模式。

处理 {#response}

使用显式的 CREATE FOREIGN TABLE 定义,改用实现了模式导入的包装器,或为包装器增加受支持的回调。对同一个 handler 重复执行相同的 IMPORT FOREIGN SCHEMA 只会得到同一能力错误。

消息与诊断 {#messages}

确认的严重级别为 ERROR,该调用组没有 detail 或 hint。保留 fdwname、服务器身份和 handler 扩展版本。

版本 {#versions}

锁定的 9.1.0 及后续快照中已有 HV00P 条件定义,但这不表示 IMPORT FOREIGN SCHEMA 在 9.1 已存在。固定的 PostgreSQL 9.5.0 源码快照已经包含该命令及其 ImportForeignSchema 回调;上面的 18.6 路径是本文确认的当前消息实现。没有可用的 9.1 之前定义观察资料。

相关 {#related}

HV00Q 是 postgres_fdw 找不到远端模式;HV00D 是无效选项名称;HV000 是一般 FDW 错误。

来源 {#sources}

  • errcodes.txt — 定义,SHA-256 6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba。
  • foreigncmds.c — 回调检查与消息。
  • fdwapi.h — ImportForeignSchema 回调定义;SHA-256 572ba892e6435ca92d3b3bc84dde5bbd3160cc3a082693daab8daa835c4d2cd7。
  • REL9_5_0 快照中的 foreigncmds.c — 命令及回调的功能边界;SHA-256 d2ab3a8883ed1e27c38a0a7ff83f0fc9d493c488d7e30f56eef7d1ae449f9a16。
  • 结构化证据 — 来源路径和有界运行范围。

比较版本

SQLSTATE 证据与已记录的运行版本

claims · identity
{
  "claim_id": "identity",
  "limits": "",
  "method": "Read the fixed definition row and macro.",
  "position": 0,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "HV00P is fdw_no_schemas in SQL/MED Class HV."
}
claims · handler-capability
{
  "claim_id": "handler-capability",
  "limits": "",
  "method": "Read the callback-null branch and handler definition.",
  "position": 1,
  "runtime": [],
  "sources": [
    "src.foreigncmds.18.6",
    "src.fdwapi.18.6"
  ],
  "statement": "The core IMPORT FOREIGN SCHEMA command emits HV00P when the selected FDW handler has no ImportForeignSchema callback."
}
claims · import-feature-boundary
{
  "claim_id": "import-feature-boundary",
  "limits": "This establishes presence in the REL9_5_0 source snapshot; it does not claim the exact development commit or behavior of every wrapper before or after that snapshot.",
  "method": "Read the fixed REL9_5_0 foreigncmds.c command path and callback invocation.",
  "position": 2,
  "runtime": [],
  "sources": [
    "src.foreigncmds.9.5.0"
  ],
  "statement": "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."
}
messages · no-import-schema-callback
{
  "limits": "",
  "message_id": "no-import-schema-callback",
  "path": "src/backend/commands/foreigncmds.c:1527-1530",
  "position": 0,
  "raw": {
    "id": "no-import-schema-callback",
    "message": "foreign-data wrapper \"%s\" does not support IMPORT FOREIGN SCHEMA",
    "path": "src/backend/commands/foreigncmds.c:1527-1530",
    "severity": "ERROR",
    "source_ids": [
      "src.foreigncmds.18.6"
    ],
    "sqlstate": "HV00P"
  },
  "severity": "ERROR",
  "sources": [
    "src.foreigncmds.18.6"
  ],
  "templates": [
    {
      "kind": "primary",
      "literal": "foreign-data wrapper \" \" does not support IMPORT FOREIGN SCHEMA",
      "position": 0,
      "role": "observed",
      "template": "foreign-data wrapper \"%s\" does not support IMPORT FOREIGN SCHEMA"
    }
  ]
}
sources · src.errcodes.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/utils/errcodes.txt",
  "position": 0,
  "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
  "source_id": "src.errcodes.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt"
}
sources · src.foreigncmds.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/foreigncmds.c",
  "position": 1,
  "sha256": "292d28c5589bbef8974af9355495431e9295a7c295a9cbdc5d7da1c5362471cd",
  "source_id": "src.foreigncmds.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/foreigncmds.c"
}
sources · src.fdwapi.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/include/foreign/fdwapi.h",
  "position": 2,
  "sha256": "572ba892e6435ca92d3b3bc84dde5bbd3160cc3a082693daab8daa835c4d2cd7",
  "source_id": "src.fdwapi.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/foreign/fdwapi.h#L259-L260"
}
sources · src.foreigncmds.9.5.0
{
  "commit": "cdd4ed5449bf317cc71b45a8deee0173822e7592",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/commands/foreigncmds.c",
  "position": 3,
  "sha256": "d2ab3a8883ed1e27c38a0a7ff83f0fc9d493c488d7e30f56eef7d1ae449f9a16",
  "source_id": "src.foreigncmds.9.5.0",
  "tag": "REL9_5_0",
  "url": "https://github.com/postgres/postgres/blob/cdd4ed5449bf317cc71b45a8deee0173822e7592/src/backend/commands/foreigncmds.c#L1509-L1542"
}
sources · src.calls.REL_18_6
{
  "commit": "",
  "docs_url": "",
  "kind": "local_artifact",
  "location": "",
  "path": "raw/calls/REL_18_6.jsonl",
  "position": 4,
  "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf",
  "source_id": "src.calls.REL_18_6",
  "tag": "",
  "url": ""
}

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 18 · english-manuals:6208a4c227b9ce814a74b62ac4bcd488002c86e498c4ea979c7c63b999f9aa16

正文语言: zh-Hans · english-manuals:6208a4c227b9ce814a74b62ac4bcd488002c86e498c4ea979c7c63b999f9aa16