# HV00J — fdw_option_name_not_found

> PostgreSQL SQLSTATE HV00J is dblink's option-name-not-found condition. It is separate from FDW option validation in postgres_fdw and file_fdw.
---

# HV00J — fdw_option_name_not_found

## At a glance {#at-a-glance}

`HV00J` is used by dblink's connection-option validation when an option name is not in the accepted dblink/libpq option set. dblink is a separate contrib client API, not an FDW callback implementation. The 18.6 core/contrib scan found no other resolved `HV00J` group.

<!-- BEGIN SQLSTATE FACTS: generated by scripts/generate.py; do not edit -->

| Field | Value |
| --- | --- |
| SQLSTATE | `HV00J` |
| Condition | `fdw_option_name_not_found` |
| 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_OPTION_NAME_NOT_FOUND` |
| Aliases | `—` |

<!-- source facts: data/errcodes/HV00J.json -->
<!-- END SQLSTATE FACTS -->

## Meaning and messages {#meaning}

At `dblink.c:2005-2011`, dblink reports `ERROR` with `invalid option "%s"`. It adds `Perhaps you meant the option "%s".` only when a close match is available; if valid options exist but no close match is found, the source emits no hint, and `There are no valid options in this context.` is used only when no valid option exists. A fixed REL9_6_24 dblink snapshot shows the older dynamic `Valid options in this context are: %s` hint; this is a bounded comparison, not an exact transition claim.

## Diagnosis {#diagnosis}

Identify whether the option belongs to a dblink connection string/option list and check the installed libpq option names. Keep the exact option name, dblink/libpq versions, and whether the failure occurred while parsing a connection definition. Do not apply `postgres_fdw` option tables to dblink.

## Response {#response}

Replace the name with the accepted dblink/libpq option or remove it, preserving the close-match hint as a guide. Validate the connection definition again; an invalid option name is deterministic and does not call for a database transaction retry.

## Diagnosis boundary {#messages}

The confirmed implementation is dblink's option parser at `contrib/dblink/dblink.c:2005-2011`; no natural runtime was run in this batch, and the source does not establish remote connection success or failure.

## Versions {#versions}

The code is present from 9.1.0 through 18.6 and 19 Beta 3. The fixed 18.6 and REL9_6_24 dblink snapshots show different hint wording; they bound the observed versions without dating the transition. Match the installed version when interpreting a log.

## Related {#related}

[`HV00D`](../hv00d/) covers `file_fdw`/`postgres_fdw` option names; [`HV00N`](../hv00n/) concerns establishing a connection; [`HV001`](../hv001/) covers an allocation failure while obtaining libpq defaults.

## Sources {#sources}

- [`errcodes.txt`](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/src/backend/utils/errcodes.txt#L479) — definition, SHA-256 `6e8de346643ba84aa3c9c6a73360acfc7b2dfb89162c06c08ce9bf5bcd5bbcba`.
- [dblink.c](https://github.com/postgres/postgres/blob/724edf9bde9d356724ad384a2e196edc3c9f80f7/contrib/dblink/dblink.c#L2002-L2011) — 18.6 dblink option parser.
- [dblink.c in REL9_6_24](https://github.com/postgres/postgres/blob/a4116b8d5a4f68803452d8f1aa3f74f302049a90/contrib/dblink/dblink.c#L2017-L2021) — bounded historical hint comparison; SHA-256 ff331aac2153e21aa88cc6c4e656ab00b0593744062270849f27281434db3b55.
- [Structured evidence](../data/evidence/hv00j.json) — exact message/detail/hint grouping.
