HV006
PostgreSQLERRORNotableForeign Data Wrapper ErrorHIGH confidence
FDW invalid data type descriptors
What this means
SQLSTATE HV006 is raised when a foreign data wrapper receives type descriptor information from the remote source that is inconsistent or invalid.
Why it happens
- 1The remote server returns type metadata that is incompatible with the FDW type descriptor expectations
How to reproduce
Type descriptor mismatch in a FDW query.
expected output
ERROR: invalid data type descriptor
Fix
Verify the foreign table column type definitions match the remote schema
WHEN When HV006 appears.
Verify the foreign table column type definitions match the remote schema
-- Re-import the remote schema to refresh type information: IMPORT FOREIGN SCHEMA public FROM SERVER remote_pg INTO local_schema;
Why this works
IMPORT FOREIGN SCHEMA refreshes the foreign table definitions from the remote schema, ensuring type descriptors are current.
Sources
Official documentation ↗
Class HV — Foreign Data Wrapper Error
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev