HV010 — fdw_function_sequence_error
HV010 — fdw_function_sequence_error
At a glance
HV010 indicates that an FDW function was called in an invalid sequence. The fixed 18.6 core/contrib call scan has no resolved HV010 report group, so it does not establish a native callback or message.
| Field | Value |
|---|---|
| SQLSTATE | HV010 |
| Condition | fdw_function_sequence_error |
| 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_FUNCTION_SEQUENCE_ERROR |
| Aliases | — |
Meaning
The condition is about the order or lifecycle of wrapper operations. fdwapi.h defines callback entry points such as planning and foreign-scan callbacks, but that API background does not emit HV010 or define every wrapper’s legal sequence.
Messages and diagnostics
No resolved 18.6 core/contrib message variant was found. Keep the complete message, callback name, operation phase, wrapper/driver version, and whether the call followed planning, scan start, iteration, rescan, modification, or cleanup.
Diagnosis
Trace the wrapper’s state machine around the failing callback. Verify which object was initialized, whether the callback was repeated or skipped, and whether cleanup ran before a later call. Use the wrapper’s own contract and source mapping to decide whether the reported sequence is local or remote.
Response
Restore the sequence required by the installed wrapper and its callback contract, then validate the same operation from a fresh object state. Avoid repeating a callback blindly: a wrapper may have already issued a remote request or released its state.
Versions
HV010 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 prove an exact introduction release.
Related
HV00B concerns an invalid handle; HV00K concerns a reply handle; HV009 concerns invalid null-pointer use.
Sources
errcodes.txt— definition, SHA-2566e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba.fdwapi.h— generic FDW callback boundary.- Structured evidence — fixed 18.6 sources and bounded scan.