HV005
Read PG 18 manual ↗fdw_column_name_not_found
- SQLSTATE
- HV005
- Condition name
- fdw_column_name_not_found
- Class
- Foreign Data Wrapper Error (SQL/MED)
- Source macro
- ERRCODE_FDW_COLUMN_NAME_NOT_FOUND
- Evidence
- Definition only
English SQLSTATE atlas: authored explanations and source/runtime evidence are separate from the manual definitions. View source ↗
At a glance
HV005 is the SQL/MED condition for a foreign column name that the wrapper cannot find in the relevant remote or imported descriptor. No direct HV005 report group was resolved in the PostgreSQL 18.6 core/contrib scan, so the concrete remote system and message remain wrapper-specific.
Meaning and scope
This code concerns name lookup at an FDW boundary: an imported or planned column name is absent from the descriptor the wrapper is using. It is narrower than a missing foreign table and different from a local 42703 undefined column.
Messages and diagnostics
No fixed core message is available. Preserve the exact name, case-folding/quoting context, foreign table or remote relation, wrapper version, and whether the failure occurred during import, planning, scan, or modification.
Diagnosis
Compare pg_attribute for the foreign table with the wrapper's remote metadata and name-translation rules. Re-run schema discovery or inspect the wrapper's import mapping where applicable. Do not infer a remote column simply from the local target list.
Response
Correct the foreign-table column definition or the wrapper's name mapping, then refresh the remote schema metadata as its documentation requires. Retry after the descriptor agrees; changing transaction retry policy cannot create a missing column.
Versions
HV005 is observed from 9.1.0 through 18.6 and the 19 Beta 3 preview. Pre-9 definition files in the locked scan did not contain it, so the precise introduction is unknown.
Sources
errcodes.txt— definition, SHA-2566e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba.FDW callback API— descriptor-consuming callback boundary.- Structured evidence — bounded scan and source boundary.
Source evidence
Evidence belongs to the frozen source and runtime versions listed here. It is not a runtime verification of the selected manual version.
HV005 is fdw_column_name_not_found in Class HV.
Method: Read the fixed definition row.
No direct HV005 report group was resolved in the locked PostgreSQL 18.6 core/contrib call scan.
Method: Compare resolved report groups with the macro mapping.
Limits: External wrappers and remote systems are outside the scan. Generic API context and the absent resolved report group do not establish a source path emitting this SQLSTATE.
- src/backend/utils/errcodes.txt · REL_18_6 ·
724edf9bde9d356724ad384a2e196edc3c9f80f7 - src/include/foreign/fdwapi.h · REL_18_6 ·
724edf9bde9d356724ad384a2e196edc3c9f80f7 raw/calls/REL_18_6.jsonl· ·
Message templates
No extracted message template is attached to this condition.
Reproduction & repair cases
No reproduction case is attached to this condition.
Recorded runtime evidence
No runtime observation is attached to this entry.
Version history 1
- PG 9.0 → 9.1added
Definition snapshot: english-manuals:6fbbf0e7e807d0a2e47dd3bf38b… · English manual source