# HV021 — fdw_inconsistent_descriptor_information

> PostgreSQL SQLSTATE HV021 names an FDW descriptor-consistency condition; the descriptor and producer must be identified from the wrapper implementation.
---

# HV021 — fdw_inconsistent_descriptor_information

## At a glance {#at-a-glance}

`HV021` identifies inconsistent information in an FDW descriptor. The 18.6 core/contrib call scan has no resolved `HV021` report group, so it does not identify a core descriptor check or message.

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

| Field | Value |
| --- | --- |
| SQLSTATE | `HV021` |
| Condition | `fdw_inconsistent_descriptor_information` |
| 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_INCONSISTENT_DESCRIPTOR_INFORMATION` |
| Aliases | `—` |

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

## Meaning {#meaning}

The descriptor may describe columns, types, names, lengths, or another wrapper-owned result contract. `fdwapi.h` exposes callback and slot boundaries, but it does not say which descriptor mismatch maps to this SQLSTATE.

## Messages and diagnostics {#messages}

No resolved 18.6 core/contrib message variant was found. Preserve the full diagnostic, descriptor kind, expected and actual metadata when shown, callback phase, wrapper/driver version, and relation identity.

## Diagnosis {#diagnosis}

Compare the descriptor supplied by the wrapper with the descriptor expected by the callback or consumer. Check schema changes, type and column order, nullability or length metadata only when the wrapper reports them; do not infer a mismatch from a generic conversion failure.

## Response {#response}

Correct the wrapper's descriptor construction or the remote/schema contract it actually identifies, then recreate the affected plan or object. Repeating the same operation without changing the mismatched metadata will not repair the descriptor.

## Versions {#versions}

`HV021` is present in the locked definition snapshots from 9.1.24 through 18.6 and 19 Beta 3, with `known_present_by` 9.1.0. The available pre-9 definition material does not establish an exact introduction release.

## Related {#related}

[`HV008`](../hv008/) concerns an FDW column sequence; [`HV091`](../hv091/) concerns a descriptor field identifier; [`HV024`](../hv024/) concerns an attribute value.

## Sources {#sources}

- [`errcodes.txt`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L463) — definition, SHA-256 `6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba`.
- [`fdwapi.h`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/foreign/fdwapi.h#L24-L55) — generic FDW callback boundary.
- [Structured evidence](../data/evidence/hv021.json) — fixed 18.6 sources and bounded scan.
