Skip to content

HV006 — fdw_invalid_data_type_descriptors

PostgreSQL SQLSTATE HV006 denotes inconsistent or unusable FDW data-type descriptors. Inspect the wrapper metadata contract before changing SQL.

HV006 — fdw_invalid_data_type_descriptors

At a glance

HV006 covers invalid data-type descriptor information at an FDW boundary. PostgreSQL 18.6 defines it but the core/contrib call scan resolved no direct report group, so no bundled wrapper message or natural SQL reproduction is claimed.

Field Value
SQLSTATE HV006
Condition fdw_invalid_data_type_descriptors
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_INVALID_DATA_TYPE_DESCRIPTORS
Aliases

Meaning

The condition is about the descriptor metadata itself: a wrapper’s type OID, length, precision, typmod, or related descriptor fields can be inconsistent with the callback contract. It is distinct from a single value that fails conversion (HV004).

Messages and diagnostics

No fixed core message was found. Record descriptor field names and values, local and remote relation identities, callback phase, wrapper version, and any remote metadata response. Do not manufacture a message from the condition name.

Diagnosis

Trace the descriptor from schema import/planning through tuple conversion. Inspect the wrapper source for the callback that builds or consumes it, then compare it with fdwapi.h and the wrapper’s pinned documentation. A stale extension binary or changed remote schema is a more useful lead than a generic SQL retry.

Response

Refresh or correct the wrapper’s descriptor construction and align the foreign-table metadata with the remote schema. If the issue follows an extension upgrade, test the matching wrapper/server ABI. Retry only after the descriptor is corrected.

Versions

The code is present in all locked formal snapshots from 9.1.24 through 18.6 and in 19 Beta 3; the earliest locked definition is 9.1.0. No pre-9 definition observation is available.

HV004 is a data-type mismatch; HV021 concerns inconsistent descriptor information more generally; HV006 focuses on data-type descriptor fields.

Sources