Skip to content

HV00P — fdw_no_schemas

PostgreSQL SQLSTATE HV00P reports that an FDW does not support IMPORT FOREIGN SCHEMA. The core command checks the wrapper callback directly.

HV00P — fdw_no_schemas

At a glance

HV00P is raised by the core IMPORT FOREIGN SCHEMA command when the selected FDW has no ImportForeignSchema callback. It means the wrapper does not support that import mechanism, not that a remote schema is empty.

Field Value
SQLSTATE HV00P
Condition fdw_no_schemas
Status active
Known present by 9.1.0
Locked snapshots 9.1.24, 9.2.24, 9.3.25, 9.4.26, 9.5.25, 9.6.24, 10.23, 11.22, 12.22, 13.23, 14.24, 15.19, 16.15, 17.11, 18.6, 19beta3
Macros ERRCODE_FDW_NO_SCHEMAS
Aliases

Meaning and message

foreigncmds.c:1527-1530 reports ERROR: foreign-data wrapper "%s" does not support IMPORT FOREIGN SCHEMA when fdw_routine->ImportForeignSchema is NULL. The wrapper name is dynamic; no remote schema query has necessarily run.

Diagnosis

Confirm the FDW named by the SERVER clause and inspect its handler’s ImportForeignSchema callback. Distinguish this unsupported capability from HV00Q, where postgres_fdw supports import but cannot find the requested remote schema.

Response

Use explicit CREATE FOREIGN TABLE definitions, choose a wrapper that implements schema import, or add the supported wrapper callback. Reissuing the same IMPORT FOREIGN SCHEMA command against the same handler will produce the same capability error.

Messages and diagnostics

The confirmed severity is ERROR, with no detail or hint in this call group. Preserve fdwname, server identity, and the handler extension version.

Versions

The HV00P condition definition is present in the locked 9.1.0 snapshot and later, but that does not date IMPORT FOREIGN SCHEMA to 9.1. The command and its ImportForeignSchema callback are present in the fixed PostgreSQL 9.5.0 source snapshot; the current 18.6 branch is the source-backed message path described above. No pre-9 definition observation is available.

HV00Q is a remote-schema-not-found result from postgres_fdw; HV00D is invalid option name; HV000 is generic FDW error.

Sources

  • errcodes.txt — definition, SHA-256 6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba.
  • foreigncmds.c — callback check and message.
  • fdwapi.hImportForeignSchema callback definition; SHA-256 572ba892e6435ca92d3b3bc84dde5bbd3160cc3a082693daab8daa835c4d2cd7.
  • foreigncmds.c in the REL9_5_0 snapshot — command and callback feature boundary; SHA-256 d2ab3a8883ed1e27c38a0a7ff83f0fc9d493c488d7e30f56eef7d1ae449f9a16.
  • Structured evidence — source path and bounded runtime scope.