HV009
Read PG 18 manual ↗fdw_invalid_use_of_null_pointer
- SQLSTATE
- HV009
- Condition name
- fdw_invalid_use_of_null_pointer
- Class
- Foreign Data Wrapper Error (SQL/MED)
- Source macro
- ERRCODE_FDW_INVALID_USE_OF_NULL_POINTER
- Evidence
- Definition only
English SQLSTATE atlas: authored explanations and source/runtime evidence are separate from the manual definitions. View source ↗
At a glance
HV009 describes an invalid null-pointer use at the FDW boundary. The PostgreSQL 18.6 core/contrib scan found no direct resolved report group, so no safe SQL reproduction or bundled message is claimed.
Meaning
The condition is intended for a wrapper/API contract violation involving a null pointer, such as an absent descriptor, handle, or callback result that the wrapper treats as present. It is not a generic SQL NULL value error and cannot be inferred from a nullable column.
Messages and diagnostics
No fixed core message variant was found. Preserve the pointer-owning callback, handle/descriptor identity, wrapper build, and full server log. A crash, XX000, or a driver exception may occur instead depending on the implementation.
Diagnosis
Treat this as a wrapper defect or contract mismatch until source proves otherwise. Inspect the callback implementation and ABI/API version, then check whether a remote disconnect or failed allocation created the null state. Do not dereference or “repair” the object from SQL.
Response
Stop retrying the same operation while the wrapper defect is present. Preserve logs and isolate the foreign server/table, then upgrade or patch the wrapper after reproducing in a disposable environment. If the process or connection terminated, follow that component's recovery procedure.
Versions
The condition is observed from 9.1.0 through 18.6 and the 19 Beta 3 preview; pre-9 definition scans did not observe it. No implementation introduction version is claimed.
Sources
errcodes.txt— definition, SHA-2566e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba.fdwapi.h— 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.
HV009 is fdw_invalid_use_of_null_pointer in Class HV.
Method: Read the fixed definition row.
No direct HV009 report group was resolved in the locked PostgreSQL 18.6 core/contrib call scan.
Method: Compare resolved report groups with the macro mapping.
Limits: A wrapper may terminate the connection or process instead of returning this code. 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:67294f17c9088907f187d5c0692… · English manual source