# 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 {#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.

<!-- BEGIN SQLSTATE FACTS: generated by scripts/generate.py; do not edit -->

| 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 | `—` |

<!-- source facts: data/errcodes/HV00P.json -->
<!-- END SQLSTATE FACTS -->

## Meaning and message {#meaning}

`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 {#diagnosis}

Confirm the FDW named by the `SERVER` clause and inspect its handler's `ImportForeignSchema` callback. Distinguish this unsupported capability from [`HV00Q`](../hv00q/), where `postgres_fdw` supports import but cannot find the requested remote schema.

## Response {#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 {#messages}

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

## Versions {#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.

## Related {#related}

[`HV00Q`](../hv00q/) is a remote-schema-not-found result from `postgres_fdw`; [`HV00D`](../hv00d/) is invalid option name; [`HV000`](../hv000/) is generic FDW error.

## Sources {#sources}

- [`errcodes.txt`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L478) — definition, SHA-256 `6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba`.
- [`foreigncmds.c`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/commands/foreigncmds.c#L1524-L1530) — callback check and message.
- [`fdwapi.h`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/foreign/fdwapi.h#L259-L260) — `ImportForeignSchema` callback definition; SHA-256 `572ba892e6435ca92d3b3bc84dde5bbd3160cc3a082693daab8daa835c4d2cd7`.
- [`foreigncmds.c` in the REL9_5_0 snapshot](https://github.com/postgres/postgres/blob/cdd4ed5449bf317cc71b45a8deee0173822e7592/src/backend/commands/foreigncmds.c#L1509-L1542) — command and callback feature boundary; SHA-256 `d2ab3a8883ed1e27c38a0a7ff83f0fc9d493c488d7e30f56eef7d1ae449f9a16`.
- [Structured evidence](../data/evidence/hv00p.json) — source path and bounded runtime scope.
