↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / SQLSTATE

HV009 — fdw_invalid_use_of_null_pointer

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.

English manual coverage begins with PostgreSQL 8.1. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

aliases
Unknown
class name
Foreign Data Wrapper Error (SQL/MED)
condition name
fdw_invalid_use_of_null_pointer
lang
en
sqlstate
HV009

Definition PG 18

HV009 — fdw_invalid_use_of_null_pointer

At a glance {#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 {#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 {#messages}

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 {#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 {#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 {#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.

Related {#related}

HV00B is an invalid FDW handle; XX000 is a broader internal-error boundary. A normal SQL null-value condition is in Class 22.

Sources {#sources}

Compare versions

SQLSTATE evidence and recorded runtime versions

claims · identity
{
  "claim_id": "identity",
  "limits": "",
  "method": "Read the fixed definition row.",
  "position": 0,
  "runtime": [],
  "sources": [
    "src.errcodes.18.6"
  ],
  "statement": "HV009 is fdw_invalid_use_of_null_pointer in Class HV."
}
claims · scan-boundary
{
  "claim_id": "scan-boundary",
  "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.",
  "method": "Compare resolved report groups with the macro mapping.",
  "position": 1,
  "runtime": [],
  "sources": [
    "src.calls.REL_18_6",
    "src.fdwapi.18.6"
  ],
  "statement": "No direct HV009 report group was resolved in the locked PostgreSQL 18.6 core/contrib call scan."
}
sources · src.errcodes.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/backend/utils/errcodes.txt",
  "position": 0,
  "sha256": "6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba",
  "source_id": "src.errcodes.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt"
}
sources · src.fdwapi.18.6
{
  "commit": "724edf9bde9d356724ad384a2e196edc3c9f80f7",
  "docs_url": "",
  "kind": "upstream_source",
  "location": "",
  "path": "src/include/foreign/fdwapi.h",
  "position": 1,
  "sha256": "572ba892e6435ca92d3b3bc84dde5bbd3160cc3a082693daab8daa835c4d2cd7",
  "source_id": "src.fdwapi.18.6",
  "tag": "REL_18_6",
  "url": "https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/include/foreign/fdwapi.h"
}
sources · src.calls.REL_18_6
{
  "commit": "",
  "docs_url": "",
  "kind": "local_artifact",
  "location": "",
  "path": "raw/calls/REL_18_6.jsonl",
  "position": 2,
  "sha256": "9ee8a0e81d8f0825c5c1ae45583439859a26e602bdd4ce2f2a62aa278867ccbf",
  "source_id": "src.calls.REL_18_6",
  "tag": "",
  "url": ""
}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · english-manuals:b4b56cd13d81cbb4bcfc72ab9245104d63c2cfe8834517b0718848058eef3ef3

Text language: en · english-manuals:b4b56cd13d81cbb4bcfc72ab9245104d63c2cfe8834517b0718848058eef3ef3